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
patientNHSNumberis the NHS Number of the patient whose GP care record you want to access - the
recordSectionis 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
timePeriodis 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
timePeriodparameter 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
patientNHSNumberis invalid (meaning, fails NHS Number format and check digit tests) - the
patientNHSNumberis not associated with aNHS Number Status Indicator CodeofNumber present and verified - the GP organisation is not the patient’s nominated primary care provider
- the
recordSectionis invalid (meaning, isn’t from the correct value set) - an invalid
timePeriodis requested (i.e. end date > start date) - a
timePeriodis specified for arecordSectionthat 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
200OK 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
StructureDefinitionprofile details in themetafields of the returned response - MUST include the
Patient,PractitionerandOrganizationdetails for the retrieved care record in a searchsetBundle - MUST include patient’s date of death in Patient.deceased(deceasedDateTime) where it is recorded in the provider system