Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 54 additions & 53 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 1
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "github actions "
include: scope
groups:
github-dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 1
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "github actions "
include: scope
groups:
github-dependencies:
patterns:
- "*"
- package-ecosystem: "pip"
directories:
- "/"
- "/sandbox"
open-pull-requests-limit: 1
versioning-strategy: auto
ignore:
- dependency-name: "*"
update-types:
["version-update:semver-minor", "version-update:semver-patch"]
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "pip "
include: scope
groups:
python-dependencies:
patterns:
- "*"

- package-ecosystem: "pip"
directories:
- "/"
- "/sandbox"
open-pull-requests-limit: 1
versioning-strategy: auto
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "pip "
include: scope
groups:
python-dependencies:
patterns:
- "*"

- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 1
versioning-strategy: auto
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "npm "
include: scope
groups:
npm-dependencies:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 1
versioning-strategy: auto
ignore:
- dependency-name: "*"
update-types:
["version-update:semver-minor", "version-update:semver-patch"]
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
commit-message:
prefix: "npm "
include: scope
groups:
npm-dependencies:
patterns:
- "*"
44 changes: 22 additions & 22 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: Code QL Analysis
"on":
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: 30 1 * * 0
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: 30 1 * * 0
permissions:
contents: read
contents: read
jobs:
CodeQL-Build:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
CodeQL-Build:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
77 changes: 38 additions & 39 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,42 @@ name: Create Release
on: push

jobs:
create_release:
name: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function

- name: Install Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Upgrade python pip
run: python -m pip install --upgrade pip

- name: Install git
run: pip install gitpython

- name: Install semver
run: pip install semver

- name: Set SPEC_VERSION env var
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Create release (master only)
id: create-release
create_release:
name: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SPEC_VERSION }}
release_name: ${{ env.SPEC_VERSION }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function

- name: Install Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Upgrade python pip
run: python -m pip install --upgrade pip

- name: Install git
run: pip install gitpython

- name: Install semver
run: pip install semver

- name: Set SPEC_VERSION env var
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Create release (master only)
id: create-release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SPEC_VERSION }}
release_name: ${{ env.SPEC_VERSION }}
22 changes: 11 additions & 11 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Dependency Review
"on": [pull_request]
permissions:
contents: read
contents: read
jobs:
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
allow-ghsas: GHSA-w596-4wvx-j9j6 # Due to APIM Pytest dependency
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
allow-ghsas: GHSA-w596-4wvx-j9j6 # Due to APIM Pytest dependency
2 changes: 1 addition & 1 deletion .github/workflows/openapi-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
name: "GET /Questionnaire",
make_target: "schema-get-questionnaire",
},
{ name: "Errors", make_target: "schema-errors" }
{ name: "Errors", make_target: "schema-errors" },
]
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prettier-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 22

- name: Install dependencies
shell: bash
Expand Down
29 changes: 14 additions & 15 deletions specification/validated-relationships-service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,16 @@ info:
## Open source
You might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:

| Resource | Description | Links |
|---------------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------|
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |
| Resource | Description | Links |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |
| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |
| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \| [Python Package index](https://pypi.org/project/nhs-number/) \| [Docs](https://nhs-number.uk-fci.tech/) |

We currently don't have any open source client libraries or sample code for this API and the source code for the PDS FHIR back end (the Core Spine source code) is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support).

## Environments and testing

| Environment | Base URL |
| ----------------- | ------------------------------------------------------------------------------------ |
| Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` |
Expand Down Expand Up @@ -246,8 +247,7 @@ paths:

| HTTP status | Error code | Description |
| ----------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 400 | `BAD_REQUEST` | Bad request. |
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
| 400 | `BAD_REQUEST` | Bad request. For details, see the `diagnostics` |
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
| 403 | `FORBIDDEN` | Access denied to resource. |
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
Expand All @@ -270,7 +270,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |

content:
application/fhir+json:
Expand Down Expand Up @@ -362,7 +362,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |

content:
application/fhir+json:
Expand Down Expand Up @@ -485,7 +485,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |

content:
application/fhir+json:
Expand Down Expand Up @@ -602,7 +602,6 @@ paths:
| 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. |
| 400 | `INVALID_VALUE` | Invalid header. For details, see the `diagnostics` field. |
| 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer:identifier or patient:identifier value. |
| 400 | `NOT_SUPPORTED` | The request is not currently supported. |
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
| 403 | `FORBIDDEN` | Access denied to resource. |
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
Expand Down Expand Up @@ -642,7 +641,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |

content:
Expand Down Expand Up @@ -767,7 +766,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |

content:
Expand Down Expand Up @@ -881,7 +880,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |

content:
Expand Down Expand Up @@ -1028,7 +1027,7 @@ paths:
| HTTP status | Error code | Description |
| ----------- | -------------------------- | ------------------------------------------------------------ |
| 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. |
| 502 | `GATEWAY_ERROR` | Connection to the backend service failed. |
| 502 | `BAD_GATEWAY` | Connection to the backend service failed. |
| 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. |

content:
Expand Down