GP Connect - Access Record HTML

This guidance is under active development by NHS England and content may be added or updated on a regular basis.
Version: This is the current 0.x (DSTU2) version of GP Connect API for building the Access Record: HTML capability only. For other capabilities and specifications, please visit the GP Connect Specifications page.

Retrieve a care record section

Use case

Retrieve a section of a patient’s record in HTML using DSTU2 FHIR bundle from a GP practice.

API specification

See API specification for more details about topic such as:

  • Who can use the API
  • Related APIs
  • API status and roadmap
  • Service level
  • Security and authorisation
  • Environments and testing
  • Onboarding
  • Error handling

Payload request body

The following data-elements are mandatory (meaning, data MUST be present):

  • the patientNHSNumber is the NHS Number of the patient whose GP care record you want to access
  • the recordSection is the GP care record section you wish to retrieve

The following data-elements are optional (meaning, MAY be supplied for certain care record sections):

  • the timePeriod is the time period over which the requested information is to be returned

The request payload is a set of Parameters conforming to the gpconnect-carerecord-operation-1 profiled OperationDefinition, see GPConnect-CareRecord-Operation-1.

Important: Provider systems MUST only expose Patient resources for patients who have a valid PDS trace status.

The provider system MUST:

  • use a default time period if no timePeriod parameter is specified for a section that can accept a time period

Refer to Per section default time frames for details of the default time periods that MUST be applied per care record section.

Error handling

The provider system MUST return an error if:

  • the patientNHSNumber is invalid (meaning, fails NHS Number format and check digit tests)
  • the patientNHSNumber is not associated with a NHS Number Status Indicator Code of Number present and verified
  • the GP organisation is not the patient’s nominated primary care provider
  • the recordSection is invalid (meaning, isn’t from the correct value set)
  • an invalid timePeriod is requested (i.e. end date > start date)
  • timePeriod is specified for a recordSection that is time period agnostic (for example, Patient Summary, Allergies etc.)
  • the patient is recorded as deceased and the request is received after the allowed access period post patient’s death. In this case, the error code “PATIENT_NOT_FOUND” should be returned.

Provider systems MUST return an OperationOutcome resource that provides additional detail when one or more data fields are corrupt or a specific business rule/constraint is breached.

Refer to Error handling guidance for details of error codes.

Payload response body

Provider systems:

  • MUST return a 200 OK HTTP status code on successful retrieval of a care record section
  • MUST return the care record section as valid XHTML in line with the FHIR Narrative guidance
  • MUST include the relevant GP Connect StructureDefinition profile details in the meta fields of the returned response
  • MUST include the PatientPractitioner and Organization details for the retrieved care record in a searchset Bundle
  • MUST include patient’s date of death in Patient.deceased(deceasedDateTime) where it is recorded in the provider system
back to top