---
title: "Get current COVID-19 medical exemption status"
method: GET
path: "/QuestionnaireResponse"
---

# Get current COVID-19 medical exemption status

`GET /QuestionnaireResponse`

## Request

- Base URL: `https://sandbox.api.service.nhs.uk/covid-medical-exemptions/FHIR/R4`
- URL: `https://sandbox.api.service.nhs.uk/covid-medical-exemptions/FHIR/R4/QuestionnaireResponse`
- Auth: none declared

Given an NHS number, get the patient's current COVID-19 medical exemption status.
Also returns the patient's demographic details, as captured at the point of the exemption decision being made.

## Sandbox testing
You can test the following scenarios in our sandbox environment:

Sample outputs are generated using any patient.identifer where the remainder of dividing by 5.  (i.e. id % 5 == X)

| Scenario                             | Request                                                                              | Response                                                |
| ------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| No Current Exemption                 | `patient.identifier` = <code>https://fhir.nhs.uk/Id/nhs-number&#124;<X%5==0></code>  | HTTP Status 200 with empty bundle in response body      |
| Exempt from Vaccination              | `patient.identifier` = <code>https://fhir.nhs.uk/Id/nhs-number&#124;<X%5==1></code>  | HTTP Status 200 with exemption data in response body    |
| Exempt from Vaccination and Testing  | `patient.identifier` = <code>https://fhir.nhs.uk/Id/nhs-number&#124;<X%5==2></code>  | HTTP Status 200 with exemption data in response body    |
| Declined for Vaccination             | `patient.identifier` = <code>https://fhir.nhs.uk/Id/nhs-number&#124;<X%5==3></code>  | HTTP Status 200 with exemption data in response body    |
| Declined for Vaccination and Testing | `patient.identifier` = <code>https://fhir.nhs.uk/Id/nhs-number&#124;<X%5==4></code>  | HTTP Status 200 with exemption data in response body    |

You can try out the sandbox using the 'Try this API' feature on this page.

## Query parameters

- `patient.identifier` string, required
- `questionnaire` string

## Headers

- `Authorization` string
- `X-Correlation-ID` string, uuid

## Response `200`

The request was valid, and the response contains a current exemption and associated patient details.
If there are no exemptions for the given NHS number, the response bundle will be empty.

- Bundle
  - `resourceType` 'Bundle', required
  - `type` 'searchset', required
  - `entry` BundleEntrySchema[]
    - `fullUrl` string
    - `resource` QuestionnaireResponseSchema: A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
      - `resourceType` string: This is a QuestionnaireResponse resource
      - `id` string: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
      - `questionnaire` string: The Questionnaire that defines and organizes the questions for which answers are being provided.
      - `status` 'in-progress' | 'completed' | 'amended' | 'entered-in-error' | 'stopped'
      - `subject` QuestionnaireResponseSubjectSchema: The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of information.
        - `reference` string
        - `identifier` object, required
          - `system` string
          - `value` string
        - `display` string, required
      - `contained` QuestionnaireResponseContainedSchema: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
        - `id` string, required
        - `resourceType` 'Patient', required
        - `birthDate` string, required
      - `item` QuestionnaireResponseItemSchema[]
        - `linkId` string, required: The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
        - `answer` QuestionnaireResponseAnswerSchema[], required: The respondent\u0027s answer(s) to the question.
          - `valueDateTime` string: The answer (or one of the answers) provided by the respondent to the question.
          - `valueCoding` object: The value of the input parameter as a basic type.
            - `code` string: 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-coordination).
            - `display` string: A representation of the meaning of the code in the system, following the rules of the system.

## Other responses

- `4XX`: An error occurred as follows: | HTTP status | Error code | Description | | ----------- | -------------------------- | -------------------------------------------------------------------- | | 400 | `processing` | Missing or invalid NHS number | | 400 | `processing` | Missing or invalid questionnaire | | 401 | `processing` | Missing or invalid ID token | | 401 | `processing` | Missing or invalid OAuth 2.0 bearer token | | 401 | `processing` | NHS number in request doesn't match NHS number in NHS login account | For details see the `diagnostics` field.

## Changes

- **2024-02-29** `051387d4ff37`: 2 breaking, 5 info
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `4XX`
  - added the optional property `entry` to the response with the `200` status
  - added the required property `issue` to the response with the `4XX` status
  - …3 more
- **2022-06-20** `53dc3b175e2d`: 1 info
  - endpoint added
- **2022-06-20** `4a7150313b1c`: 1 breaking
  - api path removed without deprecation
- **2021-11-25** `3bdf4f653ee8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nhs/apis/covid-medical-exemption-fhir-api/changes/QuestionnaireResponse/get.md)

---

[API](https://skmtc.dev/nhs/apis/covid-medical-exemption-fhir-api.md) - [All operations](https://skmtc.dev/nhs/apis/covid-medical-exemption-fhir-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nhs/apis/covid-medical-exemption-fhir-api/revisions/051387d4ff37?raw)
