Skip to content

Commit 46609ac

Browse files
committed
review comments
1 parent 74d2864 commit 46609ac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lambdas/sftp-letters/src/domain/synthetic-batch-data.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const staticPdsExampleData: [
2424
Record<string, string>,
2525
Record<string, string>,
2626
] = [
27+
// corresponds to 'Short length data example' in custom personalisation spreadsheet.
28+
// can be used to send a real letter to the NHS office
2729
{
2830
nhsNumber: '9728543751',
2931
firstName: 'Louie',
@@ -40,6 +42,7 @@ export const staticPdsExampleData: [
4042
address_line_6: 'West Yorkshire',
4143
address_line_7: 'LS1 4AP',
4244
},
45+
// corresponds to 'Medium length data example' in custom personalisation spreadsheet.
4346
{
4447
nhsNumber: '9728543417',
4548
firstName: 'John',
@@ -56,6 +59,8 @@ export const staticPdsExampleData: [
5659
address_line_6: 'DN15 0AR',
5760
address_line_7: '',
5861
},
62+
// corresponds to 'Long length data example' in custom personalisation spreadsheet.
63+
// contains special characters in the address.
5964
{
6065
nhsNumber: '9464416181',
6166
firstName: 'AAAAAAAAAABBBBBBBBBBDDDDDDDDDDEEEEE',

lambdas/sftp-letters/src/domain/synthetic-batch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class SyntheticBatch {
2525
): Record<string, string>[] {
2626
const date = this.getDate();
2727

28-
return Array.from({ length: 3 }, (_, i) => {
28+
return Array.from({ length: staticPdsExampleData.length }, (_, i) => {
2929
const fieldEntries = [
3030
['clientRef', this.clientRef(date)],
3131
['template', templateId],
@@ -86,7 +86,7 @@ export class SyntheticBatch {
8686
return {
8787
template: templateId,
8888
batch: `${batchId}.csv`,
89-
records: '3',
89+
records: staticPdsExampleData.length.toString(),
9090
// eslint-disable-next-line sonarjs/hashing
9191
md5sum: createHash('md5').update(batchCsv).digest('hex'),
9292
};

0 commit comments

Comments
 (0)