Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @NHSDigital/patient-record-management
4 changes: 2 additions & 2 deletions .github/workflows/automated-sbom-repo-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: SBOM Repo Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

Expand All @@ -35,7 +35,7 @@ jobs:
output-format: sarif

- name: Upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v4
if: always()
with:
sarif_file: ${{ steps.sbom-scan.outputs.sarif }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/base-java-service-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
working-directory: "./services/${{ inputs.service }}"
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up JDK ${{ inputs.java_version }}
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "${{ inputs.java_version }}"
Expand All @@ -73,17 +73,17 @@ jobs:
working-directory: "./services/${{ inputs.service }}"
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up JDK ${{ inputs.java_version }}
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "${{ inputs.java_version }}"
cache: gradle

- name: Configure AWS Credentials (Read/Write)
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.IAM_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
deploy_infra:
name: Deploy Infrastructure
needs: [build_and_publish]
uses: nhsconnect/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3
uses: NHSDigital/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3

with:
stack: ${{ inputs.service }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/base-node-service-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: extract_branch

- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -56,7 +56,7 @@ jobs:
run: npm install

- name: Start LocalStack
uses: LocalStack/setup-localstack@v0.2.4
uses: LocalStack/setup-localstack@v0.2.5
with:
install-awslocal: "true"

Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
working-directory: "./services/${{ inputs.service }}"
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -115,7 +115,7 @@ jobs:
- name: Install dependencies
run: npm install
- name: Configure AWS Credentials (Read/Write)
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.IAM_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
deploy_infra:
name: Deploy Infrastructure
needs: [build_and_publish]
uses: nhsconnect/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3
uses: NHSDigital/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3
with:
stack: ${{ inputs.service }}
environment: ${{ inputs.environment }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/base-python-service-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
working-directory: "./services/${{ inputs.service }}"
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.9
- name: Run Unit tests
Expand All @@ -54,16 +54,16 @@ jobs:
run:
working-directory: ./services/${{ inputs.service }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python 3.9
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.9

- name: Configure AWS credentials
id: auth
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v6
with:
mask-aws-account-id: true
role-to-assume: ${{ secrets.IAM_ROLE }}
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
if: ${{ inputs.deploy_infra && inputs.is_deployment }}
name: Deploy Infrastructure
needs: [build-and-publish-service]
uses: nhsconnect/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3
uses: NHSDigital/orphaned-record-continuity-infrastructure/.github/workflows/deploy-stack.yml@v3
with:
stack: ${{ inputs.service }}
environment: ${{ inputs.environment }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Use Node.js 22.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 22.x

Expand All @@ -25,7 +25,7 @@ jobs:
./tasks test_coverage-github-action

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v4
uses: SonarSource/sonarqube-scan-action@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:
- name: Checkout End to End
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: "nhsconnect/prm-repo-e2e-tests"

- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "adopt"
java-version: "21"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/service-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
changed: ${{ steps.get_changes.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Get Changes
id: get_changes
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
changed=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD | tr '\n' ' ')
git fetch origin main
changed=$(git diff --name-only origin/main... | tr '\n' ' ')
echo "changed=$changed" >> $GITHUB_OUTPUT

ehr-repo:
Expand Down
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Welcome to the Orphaned Record Continuity contributors guide

Thank you for your interest in improving the codebase.

In this guide you will get an overview of the contribution workflow from creating a PR, reviewing, and merging the PR.

The codebase covers:

- The [Orphaned Record Continuity service](https://digital.nhs.uk/services/orphaned-record-continuity).

To raise an issue, please contact one of the [CODEOWNERS](.github/CODEOWNERS) directly, or raise a PR.

If you're new to GitHub and/or Markdown, GitHub's own [contributor's guide](https://github.com/github/docs/blob/main/.github/CONTRIBUTING.md) provides good signposting on these topics.

## Pull requests and merging

You can't push to the main branch. Therefore, for all changes you will need to create a new branch, and then a pull request to merge said branch into `main`. The [CODEOWNERS](.github/CODEOWNERS) will be nominated as reviewers of your PR by default, but feel free to add other people as well if you think they will have valuable input.

## Contributing guidelines and etiquette

- Preview your Markdown code to make sure the format is not broken.
- Check grammar, spelling and punctuation - no-one wants to look pedantic by requesting changes due to typos or inconsistent grammar/syntax, but it's only fair to keep this tidy.
- The codebase is open to the world. This has a few implications:
- Nothing in it should be confidential, private to NHSE or include any personal data.
- All links should be public.
- Consider comments and README.md text: comments in open source repos such as this are not official communications and don't go through the normal approval process for public communication. They can however still be interpreted as official communication, even if not intended as such.
- Use [inclusive language](https://github.com/NHSDigital/software-engineering-quality-framework/blob/main/inclusive-language.md): avoid terms which cause hurt and offence, including if they have historically been considered industry-standard terms.
4 changes: 0 additions & 4 deletions services/ehr-out-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
"superagent": "8.0.8",
"semver": ">=7.5.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nhsconnect/prm-repo-ehr-out-service.git"
},
"jest": {
"resetModules": true,
"clearMocks": true,
Expand Down
4 changes: 2 additions & 2 deletions services/ehr-out-service/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=prm-orphaned-record-continuity_prm-repo-ehr-out-service
sonar.organization=prm-orphaned-record-continuity
sonar.projectKey=NHSDigital_orphaned-record-continuity
sonar.organization=nhsdigital

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=prm-repo-ehr-out-service
Expand Down
4 changes: 2 additions & 2 deletions services/ehr-transfer-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ spotbugsIntegration {

sonar {
properties {
property 'sonar.projectKey', 'prm-orphaned-record-continuity_prm-repo-ehr-transfer-service'
property 'sonar.organization', 'prm-orphaned-record-continuity'
property 'sonar.projectKey', 'NHSDigital_orphaned-record-continuity'
property 'sonar.organization', 'nhsdigital'
property 'sonar.host.url', 'https://sonarcloud.io'
}
}
Expand Down
45 changes: 23 additions & 22 deletions services/gp2gp-messenger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
This is an implementation of a component to handle the sending of the GP2GP message set used to transfer a patient's Electronic Health Record between GP Practices.
It uses the GP2GP message format to transfer orphaned and stranded records out of a secure NHS repository.

This component will communicate with the Message Handler Service (MHS) [GitHub nhsconnect/integration-adaptors](https://github.com/nhsconnect/integration-adaptors) and other components being developed by the Orphaned and Stranded Record programme.
This component will communicate with the Message Handler Service (MHS) using the [NIA MHS Adaptor](https://github.com/NHSDigital/integration-adaptor-mhs) and other components being developed by the Orphaned Record Continuity programme.

The initial version will send health records that are encoded in the HL7 format. A subsequent enhancement will be access to the components of the Health Record so that other services can use this component to send and receive Health Records with the need to implement the encoding and fragmentation strategies of the [GP2GP v2.2a](https://data.developer.nhs.uk/dms/mim/6.3.01/Domains/GP2GP/Document%20files/GP2GP%20IM.htm) message specification.

## Prerequisites

- [Node](https://nodejs.org/en/download/package-manager/#nvm) - version 14.x
- [Docker](https://docs.docker.com/install/)

### AWS helpers

This repository imports shared AWS helpers from [prm-deductions-support-infra](https://github.com/nhsconnect/prm-deductions-support-infra/).
Expand All @@ -20,22 +20,26 @@ They can be found `utils` directory after running any task from `tasks` file.
## Set up

If you would like to run the app locally, you need to:

1. Run `npm install` to install all node dependencies as per `package.json`.
2. Set up the env variables and/or copy them into your IDE configurations (`Run -> Edit Configurations ->Environment Variables` in IntelliJ):
```
export E2E_TEST_AUTHORIZATION_KEYS_FOR_GP2GP_MESSENGER=auth-key-2
export REPOSITORY_URI=$IMAGE_REPO_NAME
export NHS_SERVICE=gp2gp-messenger
export SERVICE_URL=http://${NHS_SERVICE}:3000
export NHS_ENVIRONMENT=local
export GP2GP_MESSENGER_REPOSITORY_ASID=deduction-asid
export GP2GP_MESSENGER_REPOSITORY_ODS_CODE=deduction-ods
```
- Locally, the variables `GP2GP_MESSENGER_REPOSITORY_ASID`, `GP2GP_MESSENGER_REPOSITORY_ODS_CODE` can be set
to any value

1. Set up the env variables and/or copy them into your IDE configurations (`Run -> Edit Configurations ->Environment Variables` in IntelliJ):

```bash
export E2E_TEST_AUTHORIZATION_KEYS_FOR_GP2GP_MESSENGER=auth-key-2
export REPOSITORY_URI=$IMAGE_REPO_NAME
export NHS_SERVICE=gp2gp-messenger
export SERVICE_URL=http://${NHS_SERVICE}:3000
export NHS_ENVIRONMENT=local
export GP2GP_MESSENGER_REPOSITORY_ASID=deduction-asid
export GP2GP_MESSENGER_REPOSITORY_ODS_CODE=deduction-ods
```

> Locally, the variables `GP2GP_MESSENGER_REPOSITORY_ASID`, `GP2GP_MESSENGER_REPOSITORY_ODS_CODE` can be set
to any value

3. The app will use a fake MHS when `NHS_ENVIRONMENT` is set to `local` or `dev`.
1. The app will use a fake MHS when `NHS_ENVIRONMENT` is set to `local` or `dev`.

## Running the tests

Run the unit tests by running `./tasks test_unit`
Expand All @@ -46,14 +50,12 @@ Run the integration tests with:

You can also run them with `npm run test:integration` but that will require some additional manual set-up


Run the coverage tests (unit test and integration test)

By running `./tasks test_coverage`

or run `npm run test:coverage` on your machine


## Start the app locally

1. Run a development server with `npm run start:local`
Expand All @@ -65,7 +67,7 @@ The swagger documentation for the app can be found at `http://localhost:3000/swa

### Example request

```
```bash
curl -X POST "http://localhost:3000/ehr-request" -H "accept: application/json" -H "Authorization: auth-key-1" -H "Content-Type: application/json" -d "{ \"nhsNumber\": \"some-nhs-number\", \"odsCode\": \"some-ods-code\"}"
```

Expand All @@ -75,8 +77,7 @@ Compile the code with `npm run build`, and then start the server with `npm start

## Config

Ensure you have VPN connection set up to both `dev` and `test` environments:
[CLICK HERE](https://gpitbjss.atlassian.net/wiki/spaces/TW/pages/1832779966/VPN+for+Deductions+Services)
Ensure you have a VPN connection set up to the `dev` environment ([see this Confluence page](https://gpitbjss.atlassian.net/wiki/spaces/TW/pages/1832779966/VPN+for+Deductions+Services)).

## Access to AWS from CLI

Expand All @@ -89,4 +90,4 @@ As a note, this set-up is based on the README of assume-role [tool](https://gith

## Assume role with elevated permissions

In order to get sufficient access to work with terraform or AWS CLI, please export secrets from the AWS Access Portal for the environment you are using
In order to get sufficient access to work with terraform or AWS CLI, please export secrets from the AWS Access Portal for the environment you are using
4 changes: 0 additions & 4 deletions services/gp2gp-messenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
"start:local": "babel-node -r dotenv/config src/server.js",
"start:nodemon": "nodemon --exec babel-node -r dotenv/config src/server.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nhsconnect/prm-deductions-gp2gp-messenger.git"
},
"dependencies": {
"@aws-sdk/client-sqs": "^3.470.0",
"@babel/runtime": "^7.17.8",
Expand Down
4 changes: 2 additions & 2 deletions services/gp2gp-messenger/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=prm-orphaned-record-continuity_prm-repo-gp2gp-messenger
sonar.organization=prm-orphaned-record-continuity
sonar.projectKey=NHSDigital_orphaned-record-continuity
sonar.organization=nhsdigital

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName="GP2GP Messenger"
Expand Down
4 changes: 2 additions & 2 deletions services/mesh-forwarder/sonar-project copy.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=prm-orphaned-record-continuity_prm-mesh-aws-forwarder
sonar.organization=prm-orphaned-record-continuity
sonar.projectKey=NHSDigital_orphaned-record-continuity
sonar.organization=nhsdigital

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=prm-mesh-aws-forwarder
Expand Down
Loading
Loading