GP Connect Patient API

The Patient API from GP Connect — 4 operation(s) for patient.

Operations 4

POST /Patient/$gpc.getstructuredrecord Access a structured record relating to a patient.
GET /Patient/{id}/Appointment Read a patient's appointments
GET /Patient/{id}/DocumentReference Search for a patients documents #
GET /Patient/{id}/MedicationRequest Get prescription issue details #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gp-connect-patient-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gp-connect-patient-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gp Connect Patient API
  version: Computed and injected at build time by `scripts/set_version.py`
  description: 'Operations tagged Patient across 4 of this provider''s published API definitions: gp-connect-access-record-structured-fhir.yaml, gp-connect-appointments-management-fhir.yaml, gp-connect-patient-facing-access-record-fhir.yaml, gp-connect-patient-facing-prescriptions-management-fhir.yaml. Each path carries the servers of the definition it was published in.'
servers:
- description: Sandbox environment.
  url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
- description: Integration test environment.
  url: https://int.api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
- description: Production environment.
  url: https://api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
- url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
  description: Sandbox environment.
- url: https://int.api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
  description: Integration test environment.
- url: https://api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
  description: Production environment.
- url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
  description: Sandbox environment.
- url: https://int.api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
  description: Integration test environment.
- url: https://api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
  description: Production environment.
tags:
- name: Patient
paths:
  /Patient/$gpc.getstructuredrecord:
    post:
      summary: Access a structured record relating to a patient.
      description: "## Overview \nThis end point returns a patient's record in structured format using FHIR Operations. It returns a Bundle.\nThe request body must be a Parameters resource.\n"
      parameters:
      - $ref: '#/components/parameters/ProviderASID'
      - $ref: '#/components/parameters/ConsumerASID'
      - $ref: '#/components/parameters/InteractionID'
      - $ref: '#/components/parameters/TraceID'
      requestBody:
        required: true
        description: Valid request for the entire record.
        content:
          application/fhir+json:
            schema:
              type: object
              description: 'TODO: Add in description with link to Simplifier

                '
            example:
              resourceType: Parameters
              parameter:
              - name: patientNHSNumber
                valueIdentifier:
                  system: https://fhir.nhs.uk/Id/nhs-number
                  value: '9000000009'
              - name: includeAllergies
                part:
                - name: includeResolvedAllergies
                  valueBoolean: true
              - name: includeMedication
                part:
                - name: includePrescriptionIssues
                  valueBoolean: true
                - name: medicationSearchFromDate
                  value: '2019-12-21'
              - name: includeConsultations
                part:
                - name: consultationSearchPeriod
                  valuePeriod:
                    start: '2019-12-21'
                    end: '2020-02-21'
                - name: includeNumberOfMostRecent
                  value: 5
              - name: includeProblems
                part:
                - name: filterStatus
                  valueCode: active
                - name: filterSignificance
                  valueCode: major
              - name: includeImmunisations
                part:
                - name: includeNotGiven
                  valueBoolean: true
                - name: includeStatus
                  valueBoolean: true
              - name: includeUncategorisedData
                part:
                - name: uncategorisedDataSearchPeriod
                  valuePeriod:
                    start: '2019-12-21'
                    end: '2020-02-21'
              - name: includeInvestigations
                part:
                - name: investigationSearchPeriod
                  valuePeriod:
                    start: '2019-12-21'
                    end: '2020-02-21'
              - name: includeReferrals
                part:
                - name: referralSearchPeriod
                  valuePeriod:
                    start: '2019-12-21'
                    end: '2020-02-21'
              - name: includeDiaryEntries
                part:
                - name: diaryEntriesSearchDate
                  value: '2019-12-21'
      responses:
        '200':
          description: Returned with the response body which will be a [GPConnect-StructuredRecord-Bundle-1](https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-StructuredRecord-Bundle-1/_history/1.3) resource
      tags:
      - Patient
  /Patient/{id}/Appointment:
    get:
      summary: Read a patient's appointments
      description: Retrieve all appointments for the patient within a defined time-frame.
      parameters:
      - $ref: '#/components/parameters/BearerAuthorization'
      - $ref: '#/components/parameters/CorrelationID'
      - $ref: '#/components/parameters/RequestID'
      - name: id
        in: path
        description: The patient's NHS number. The primary identifier of a patient, unique within NHS England and Wales. Always 10 digits and must be a [valid NHS number](https://www.datadictionary.nhs.uk/attributes/nhs_number.html).
        required: true
        schema:
          type: string
        example: '9000000009'
      - name: start
        in: query
        description: Appointment start/end dates. Default values show a query for appointments on or after 2020-05-09 and on or before 2020-05-19.
        required: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
          default:
          - ge2020-05-09
          - le2020-05-19
      - in: query
        name: _include:recurse
        description: 'Appointment:actor:Practitioner Include Practitioner resources referenced in Appointment:actor

          Appointment:actor:Location Include Location resources referenced in Appointment:actor

          '
        schema:
          type: array
          items:
            type: string
            enum:
            - Appointment:actor:Practitioner
            - Appointment:actor:Location
      - name: past-appt-limit
        in: query
        description: Number of past appointments to return in query, starting at the date given in the "le" portion of the start parameter and working backwards. Parameter is optional, if no value supplied then no limits are applied.
        required: false
        schema:
          type: string
          example: '5'
      - name: status
        in: query
        description: 'The type of status to search: you can find valid values [here](https://simplifier.net/packages/hl7.fhir.r4.core/4.0.1/files/83480)

          '
        required: false
        schema:
          type: string
          example: proposed
      responses:
        200:
          description: OK
          content:
            application/fhir+json:
              schema:
                type: object
                description: Link to Profile--GPConnect-Appointment-1 resource population guidance [here](https://simplifier.net/guide/gpconnect-data-model/Home/FHIR-Assets/All-assets/Profiles/Profile--GPConnect-Appointment-1?version=current).
              examples:
                example:
                  $ref: components/examples/PatientAppointment.yaml
        4XX:
          description: 'An error occurred as follows:



            | HTTP status | Error code               | Description                                                        |

            | ----------- | ----------               | -----------                                                        |

            | 400         | INVALID_IDENTIFIER_VA    | Invalid identifier value                                           |

            | 400         | BAD_REQUEST              | Submitted request is malformed/invalid                             |

            | 400         | VALIDATION_ERROR         | This is the "default" error thrown when no others are applicable   |

            | 400         | UNSUPPORTED_VALUE        | There was an unsupported value in the request                      |

            | 400         | NO_ORGANISATION_CONSENT  | Organisation has not provided consent to share data                |

            | 400         | BAD_REQUEST              | Submitted request is malformed/invalid                             |

            | 403         | ACCESS_DENIED            | Access denied                                                      |

            | 404         | NO_RECORD_FOUND          | No record found                                                    |

            '
          content:
            application/fhir+json:
              schema:
                type: object
                description: Link to GPConnect-OperationOutcome-1 resource population guidance [here](https://simplifier.net/guide/gpconnect-data-model/Home/FHIR-Assets/All-assets/Profiles/Profile--GPConnect-OperationOutcome-1?version=current).
              examples:
                example:
                  value:
                    resourceType: OperationOutcome
                    meta:
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1
                    issue:
                    - severity: error
                      code: not-found
                      details:
                        coding:
                        - system: https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1
                          code: NO_RECORD_FOUND
                          display: No record found
      tags:
      - Patient
    servers:
    - description: Sandbox environment.
      url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
    - description: Integration test environment.
      url: https://int.api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
    - description: Production environment.
      url: https://api.service.nhs.uk/gp-connect/patient-facing/appointments-management-fhir/FHIR/STU3/
  /Patient/{id}/DocumentReference:
    get:
      operationId: search-document
      summary: Search for a patients documents
      description: 'Use this endpoint to search for a patients documents from a GP Practice.


        Use the patient id obtained from the  /documents/Patient/{id} endpoint (NOT NHS Number).   The NHS number of the patient is also required as a query string parameter.


        Details on the included parameters can be found below. These parameters must be used to reduce the number of API calls.

        '
      parameters:
      - $ref: '#/components/parameters/BearerAuthorization'
      - $ref: '#/components/parameters/CorrelationID'
      - $ref: '#/components/parameters/RequestID_2'
      - in: path
        name: id
        description: The id of the patient obtained by using the /documents/Patient/{id} endpoint using their NHS Number. This can vary depending on GP provider system.
        schema:
          type: string
          example: 9d43831b-b2c7-4f8f-b5b5-1d9429acf5fb
        required: true
      - in: query
        name: patientNHSNumber
        description: The NHS number of the patient for whom documents are being searched.
        required: true
        schema:
          type: string
          example: '9000000009'
      - in: query
        name: _include
        description: 'DocumentReference:subject:Patient - Include Patient resources referenced within the returned DocumentReference resources

          DocumentReference:custodian:Organization - Details of organisations that are custodians for the documents that are returned in DocumentReference resources

          DocumentReference:author:Organization - Details of organisations that authored the documents that are returned in DocumentReference resources

          DocumentReference:author:Practitioner - Details of who/what authored the documents that are returned in DocumentReference resources

          '
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - DocumentReference:subject:Patient
            - DocumentReference:custodian:Organization
            - DocumentReference:author:Organization
            - DocumentReference:author:Practitioner
      - in: query
        name: _revinclude:recurse
        description: PractitionerRole:practitioner Include PractitionerRole resources referenced from matching Practitioner resources
        schema:
          type: array
          items:
            type: string
            enum:
            - PractitionerRole:practitioner
        required: false
      - in: query
        name: created
        description: 'The created date <eq|ge|le>yyyy-mm-dd. To use a range use authored-on=geyyyy-mm-dd&authored-on=leyyyy-mm-dd

          '
        required: false
        schema:
          type: string
        examples:
          exact date:
            value: eq2010-10-22
            description: Exact match date
          greater than or equals:
            value: g2022-01-15
            description: Greater than or equals which matches 2022-01-15 or 2022-01-16
          less than or equals:
            value: le2022-01-15
            description: Less than or equals which matches 2022-01-15 or 2022-01-14
      - in: query
        name: author
        description: 'Who/what authored the documents that are returned

          '
        required: false
        schema:
          type: string
          example: https://fhir.nhs.uk/Id/sds-user-id|G13579135
      - in: query
        name: description
        description: 'The description of the document that is returned

          '
        required: false
        schema:
          type: string
          example: Discharge Summary
      responses:
        '200':
          description: 'This endpoint returns a bundle containing relevant documents.

            '
          content:
            application/fhir+json:
              schema:
                type: object
                description: The response will be a populated Binary resource.
              example:
                resourceType: Bundle
                meta:
                  profile:
                  - https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-Searchset-Bundle-1
                type: searchset
                entry:
                - fullUrl: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/Patient/04603d77-1a4e-4d63-b246-d7504f8bd833
                  resource:
                    resourceType: Patient
                    id: 04603d77-1a4e-4d63-b246-d7504f8bd833
                    meta:
                      versionId: '1469448000000'
                      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: registrationPeriod
                        valuePeriod:
                          start: '1962-07-13T00:00:00+00:00'
                    identifier:
                    - extension:
                      - url: https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-NHSNumberVerificationStatus-1
                        valueCodeableConcept:
                          coding:
                          - system: https://fhir.nhs.uk/CareConnect-NHSNumberVerificationStatus-1
                            code: '01'
                            display: Number present and verified
                      system: https://fhir.nhs.uk/Id/nhs-number
                      value: '9999999999'
                    active: true
                    name:
                    - use: official
                      text: JACKSON Jane (Miss)
                      family: Jackson
                      given:
                      - Jane
                      prefix:
                      - Miss
                    telecom:
                    - system: phone
                      value: 01454587554
                      use: home
                    gender: female
                    birthDate: '1952-05-31'
                    address:
                    - use: home
                      type: physical
                      line:
                      - Cable Place
                      - Roundhay
                      city: Leeds
                      district: West Yorkshire
                      postalCode: LS1 5HT
                    generalPractitioner:
                    - reference: Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7
                    managingOrganization:
                      reference: Organization/db67f447-b30d-442a-8e31-6918d1367eeb
                - fullUrl: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/DocumentReference/27863182736
                  resource:
                    resourceType: DocumentReference
                    id: '27863182736'
                    meta:
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DocumentReference-1
                    masterIdentifier:
                      system: LocalSystem/1
                      value: bb2374e2-dde2-11e9-9d36-2a2ae2dbcce4
                    identifier:
                    - system: https://fhir.nhs.uk/Id/cross-care-setting-identifier
                      value: bb237762-dde2-11e9-9d36-2a2ae2dbcce4
                    status: current
                    type:
                      coding:
                      - system: http://snomed.info/sct
                        code: '824331000000106'
                        display: Inpatient final discharge letter
                    subject:
                      reference: Patient/04603d77-1a4e-4d63-b246-d7504f8bd833
                    created: '2019-06-24T09:35:00+11:00'
                    indexed: '2019-07-02T09:43:41+11:00'
                    author:
                    - reference: Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7
                    description: Discharge Summary
                    content:
                    - attachment:
                        contentType: application/msword
                        url: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/Binary/07a6483f-732b-461e-86b6-edb665c45510
                        size: 3654
                    context:
                      practiceSetting:
                        coding:
                        - system: http://snomed.info/sct
                          code: '1060971000000108'
                          display: General practice service
                      encounter:
                        reference: Encounter/4
                - fullUrl: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/Organization/db67f447-b30d-442a-8e31-6918d1367eeb
                  resource:
                    resourceType: Organization
                    id: db67f447-b30d-442a-8e31-6918d1367eeb
                    meta:
                      versionId: '636064088098730113'
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1
                    identifier:
                    - system: https://fhir.nhs.uk/Id/ods-organization-code
                      value: O001
                    name: The Trevelyan Practice
                    address:
                    - line:
                      - Trevelyan Square
                      - Boar Ln
                      city: Leeds
                      district: West Yorkshire
                      postalCode: LS1 6AE
                    telecom:
                    - system: phone
                      value: 03003035678
                      use: work
                - fullUrl: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7
                  resource:
                    resourceType: Practitioner
                    id: 6c41ebfd-57c3-4162-9d7b-208c171a2fd7
                    meta:
                      versionId: '1469448000000'
                      lastUpdated: '2016-07-25T12:00:00.000+00:00'
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1
                    identifier:
                    - system: https://fhir.nhs.uk/Id/sds-user-id
                      value: G13579135
                    name:
                    - use: usual
                      family: Gilbert
                      given:
                      - Nichole
                      prefix:
                      - Miss
                    gender: female
                - fullUrl: http://exampleGPSystem.co.uk/GP0001/STU3/1/gpconnect-documents/PractitionerRole/e0244de8-07ef-4274-9f7a-d7067bcc8d21
                  resource:
                    resourceType: PractitionerRole
                    id: e0244de8-07ef-4274-9f7a-d7067bcc8d21
                    meta:
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-PractitionerRole-1
                    practitioner:
                      reference: Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7
                    organization:
                      reference: Organization/db67f447-b30d-442a-8e31-6918d1367eeb
                    code:
                    - coding:
                      - system: https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1
                        code: R0260
                        display: General Medical Practitioner
        4XX:
          description: 'An error occured as follows:



            | HTTP Status | Spine error code  | Description                                                                                                                                 |

            | ----------- | ----------------  | -----------                                                                                                                                 |

            | 400         | INVALID_PARAMETER | The author query parameter contains an identifier other than an ODS code                                                                    |

            | 400         | INVALID_PARAMETER | The request does not contain the mandatory _include parameters                                                                              |

            | 400         | INVALID_NHS_NUMBER | The NHS number provided is invalid, for example it fails format or check digit tests                                                       |

            | 404         | PATIENT_NOT_FOUND | A patient could not be found with the patient id provided                                                                                   |

            | 404         | PATIENT_NOT_FOUND | The request is for the record of an inactive or deceased patient                                                                            |

            | 404         | PATIENT_NOT_FOUND | The request is for the record of a non-Regular/GMS patient (i.e. the patient''s registered practice is somewhere else)                       |

            | 404         | PATIENT_NOT_FOUND | The patient''s NHS number in the provider system is not associated with a NHS number status indicator code of ''Number present and verified''  |

            | 404         | PATIENT_NOT_FOUND | The request is for a sensitive Patient                                                                                                      |

            | 422         | INVALID_PARAMETER  | The patientNHSNumber parameter is not provided                                                                                             |

            '
          content:
            application/fhir+json:
              schema:
                type: object
                description: Link to GPConnect-OperationOutcome-1 resource population guidance [here](https://simplifier.net/guide/gpconnect-data-model/Home/FHIR-Assets/All-assets/Profiles/Profile--GPConnect-OperationOutcome-1?version=current).
              examples:
                example:
                  value:
                    resourceType: OperationOutcome
                    meta:
                      profile:
                      - https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1
                    issue:
                    - severity: error
                      code: not-found
                      details:
                        coding:
                        - system: https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1
                          code: PATIENT_NOT_FOUND
                          display: No patient found
      tags:
      - Patient
    servers:
    - url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
      description: Sandbox environment.
    - url: https://int.api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
      description: Integration test environment.
    - url: https://api.service.nhs.uk/gp-connect/patient-facing/access-record-fhir/FHIR/STU3/
      description: Production environment.
  /Patient/{id}/MedicationRequest:
    get:
      operationId: get-ordered-medicationrequest
      summary: Get prescription issue details
      description: '## Overview

        Use this endpoint to get details of previous prescription issues.

        The request must include the following parameter:


        * patient


        The request can optionally include include one of following parameters:


        * authoredon


        * identifier


        * intent


        * status


        Each MedicationRequest with intent of order must reference a MedicationRequest with intent plan within the basedOn element.

        ## Use cases

        Use cases covered by this endpoint include:


        * to get information about previously prescribed medication to display to the patient


        * present previously prescribed repeat medications available to reorder

        '
      parameters:
      - $ref: '#/components/parameters/BearerAuthorization'
      - $ref: '#/components/parameters/CorrelationID'
      - $ref: '#/components/parameters/RequestID_3'
      - in: path
        name: id
        description: 'The NHS number of the patient whose requests you are searching for

          '
        required: true
        schema:
          type: string
          example: '9912003489'
      - in: query
        name: authoredon
        description: 'Date the prescription was requested, format: <eq|ge|le>YYYY-MM-DD. To use a range use authoredon=geYYYY-MM-DD&authoredon=leYYYY-MM-DD

          '
        required: false
        schema:
          type: string
        examples:
          exact date:
            value: eq2010-10-22
            description: Exact match date
          greater than or equals:
            value: ge2022-01-15
            description: Greater than or equals which matches 2022-01-15 or 2022-01-16
          less than or equals:
            value: le2022-01-15
            description: Less than or equals which matches 2022-01-15 or 2022-01-14
      - in: query
        name: identifier
        description: 'This will either be a uuid OR an EPS prescription identifier, this should only be used to obtain specific EPS orders using their identifier.


          EPS prescription Identifier for the prescription. Searches for EPS prescriptions need to provide a data type of `https://fhir.nhs.uk/Id/prescription-order-number` in the format `<data-type>|<prescription-identifier>`

          '
        required: false
        schema:
          type: string
        examples:
          eps-prescription:
            value: https://fhir.nhs.uk/Id/prescription-order-number|CDT38E-Y765968-4FG3BQ
      - in: query
        name: intent
        description: 'Intent of the MedicationRequest, will either be plan or order. If plan is selected only MedicationRequest''s with intent of plan will be returned.

          '
        required: false
        schema:
          type: string
        examples:
          intent:
            value: plan
      - in: query
        name: status
        description: 'The type of status to search: you can find valid values [here](https://simplifier.net/guide/gp-connect--patient-facing-services--prescriptions/Home/FHIR-Assets/All-Assets/Profiles/UKCore-MedicationRequest?version=0.1.1-private-beta#status)

          '
        required: false
        schema:
          type: string
          example: active
      responses:
        '200':
          description: Successful request to view previous prescription issue details
          content:
            application/fhir+json:
              schema:
                type: object
                description: Information surrounding how the resource is populated can be found [here](https://simplifier.net/guide/gp-connect--patient-facing-services--prescriptions/Home/FHIR-Assets/All-Assets/Profiles/UKCore-MedicationRequest?version=0.1.1-private-beta).
              examples:
                GetResponsePreviousPrescriptionDetailed:
                  $ref: '#/components/examples/GetResponsePreviousPrescriptionDetailed'
                GetResponseMultiplePrescriptions:
                  $ref: '#/components/examples/GetResponseMultiplePrescriptions'
                GetResponseMethotrexate:
                  $ref: '#/components/examples/GetResponseMethotrexate'
        4XX:
          description: 'An error occurred as follows:



            | HTTP Status | Spine error code   | Description

            |-------------|--------------------|------------

            | 404         | RESOURCE_NOT_FOUND | The request is for a MedicationRequest that doesn''t exist

            | 422         | INVALID_PARAMETER  | The MedicationRequest id supplied is invalid

            | 422         | INVALID_PARAMETER  | The date is invalid or in future

            | 422         | INVALID_PARAMETER  | The identifier value is invalid

            '
          content:
            application/fhir+json:
              schema:
                type: object
                description: Link to UKCore-OperationOutcome resource population guidance [here](https://simplifier.net/guide/gp-connect--patient-facing-services--prescriptions/Home/FHIR-Assets/All-Assets/Profiles/UKCore-OperationOutcome?version=0.1.1-private-beta).
              examples:
                InvalidRequestError:
                  $ref: '#/components/examples/InvalidRequestError'
      tags:
      - Patient
    servers:
    - url: https://sandbox.api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
      description: Sandbox environment.
    - url: https://int.api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
      description: Integration test environment.
    - url: https://api.service.nhs.uk/gp-connect/patient-facing/prescriptions-management-fhir/FHIR/R4
      description: Production environment.
components:
  parameters:
    InteractionID:
      in: header
      name: Ssp-InteractionID
      description: "\tSpine Interaction ID, likely to be \turn:nhs:names:services:gpconnect:fhir:operation:gpc.getstructuredrecord-1\n"
      required: true
      schema:
        type: string
        example: urn:nhs:names:services:gpconnect:fhir:operation:gpc.getstructuredrecord-1
    ProviderASID:
      in: header
      name: Ssp-To
      description: "\tProvider's ASID - identified by use of SDS\n"
      required: true
      schema:
        type: string
        example: '918999198738'
    ConsumerASID:
      in: header
      name: Ssp-From
      description: "\tConsumer's ASID - that of the requesting organisation\n"
      required: true
      schema:
        type: string
        example: '200000000359'
    TraceID:
      in: header
      name: S

# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gp-connect/refs/heads/main/openapi/gp-connect-patient-api-openapi.yml