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
6 changes: 5 additions & 1 deletion .github/workflows/base-node-service-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ jobs:
run: npm install

- name: Start LocalStack
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
env:
LOCALSTACK_ACKNOWLEDGE_ACCOUNT_REQUIREMENT: "1" # https://github.com/localstack/setup-localstack/issues/65
with:
install-awslocal: "true"
use-pro: false
image-tag: "4.14.0"

# https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html
- name: Create AWS resources
Expand Down
165 changes: 103 additions & 62 deletions services/ehr-out-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/ehr-out-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"expect": "^29.3.1",
"express": "^5.2.1",
"express-validator": "^7.3.1",
"fast-xml-parser": "^4.2.5",
"fast-xml-parser": "^5.5.9",
"lodash.chunk": "^4.2.0",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ describe('Database connection test', () => {
// when
await Promise.all(databaseOperationPromises);

const recordsAfterTransaction = await db.queryTableByInboundConversationId(
INBOUND_CONVERSATION_ID
);
const recordsAfterTransaction =
await db.queryTableByInboundConversationId(INBOUND_CONVERSATION_ID);
const fragments = recordsAfterTransaction.filter(isFragment);
// then
fragments.forEach(fragment => {
Expand Down
6 changes: 1 addition & 5 deletions services/ehr-out-service/src/middleware/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ export const authenticateRequest = (req, res, next) => {
}

if (!validAuthorizationKeys.includes(authorizationKey)) {
logWarning(
`Unsuccessful Request: ${req.method} ${
req.originalUrl
}, Invalid API Key presented`
);
logWarning(`Unsuccessful Request: ${req.method} ${req.originalUrl}, Invalid API Key presented`);
res.status(403).json({
error: `Authorization header is provided but not valid`
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ export async function transferOutFragmentsForRetriedContinueRequest({
}) {
setCurrentSpanAttributes({ conversationId });
logInfo(`Retrying the EHR Fragment transfer.`);
const { inboundConversationId } = await getFragmentConversationAndMessageIdsFromEhrRepo(
nhsNumber
);
const { inboundConversationId } =
await getFragmentConversationAndMessageIdsFromEhrRepo(nhsNumber);
logInfo('Retrieved all fragment Message IDs for transfer.');

const messageIdsWithReplacementsEligibleForSending = await getAllFragmentIdsToBeSent(
inboundConversationId
);
const messageIdsWithReplacementsEligibleForSending =
await getAllFragmentIdsToBeSent(inboundConversationId);

logInfo(
`Found ${messageIdsWithReplacementsEligibleForSending.length} Message ID replacements eligible to be sent.`
Expand Down
4 changes: 2 additions & 2 deletions services/ehr-out-service/test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const AWS_ACCOUNT_NO = '000000000000';
const LOCALSTACK_URL = 'http://localhost:4566';
const AWS_REGION = 'eu-west-2';
export const config = {
nhsEnvironment: "dev",
serviceUrl: "www.example.com",
nhsEnvironment: 'dev',
serviceUrl: 'www.example.com',
localstackEndpointUrl: LOCALSTACK_URL,
region: AWS_REGION,
awsAccountNo: AWS_ACCOUNT_NO,
Expand Down
Loading
Loading