File tree Expand file tree Collapse file tree
packages/postDatedLambda/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,7 +184,6 @@ Resources:
184184 - TerminalStatus
185185 - LastModified
186186 - Status
187- - PostDatedLastModifiedSetAt # TODO: Remove this when we deprecate post modified prescriptions.
188187 ProjectionType : INCLUDE
189188 ProvisionedThroughput : !If
190189 - EnableDynamoDBAutoScalingCondition
@@ -202,6 +201,27 @@ Resources:
202201 - ReadCapacityUnits : 1
203202 WriteCapacityUnits : !Ref MinWritePrescriptionStatusUpdatesCapacity
204203 - !Ref " AWS::NoValue"
204+ # TODO: Remove this when we deprecate post modified prescriptions.
205+ - IndexName : PharmacyODSCodePrescriptionIDIndexPostDatedIndex
206+ KeySchema :
207+ - AttributeName : PharmacyODSCode
208+ KeyType : HASH
209+ - AttributeName : PrescriptionID
210+ KeyType : RANGE
211+ Projection :
212+ NonKeyAttributes :
213+ - PatientNHSNumber
214+ - LineItemID
215+ - TerminalStatus
216+ - LastModified
217+ - Status
218+ - PostDatedLastModifiedSetAt
219+ ProjectionType : INCLUDE
220+ ProvisionedThroughput : !If
221+ - EnableDynamoDBAutoScalingCondition
222+ - ReadCapacityUnits : 1
223+ WriteCapacityUnits : !Ref MinWritePrescriptionStatusUpdatesCapacity
224+ - !Ref " AWS::NoValue"
205225 Tags :
206226 - Key : " EPS-Tablename"
207227 Value : " PrescriptionStatusUpdates"
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111
1212const client = new DynamoDBClient ( )
1313const tableName = process . env . TABLE_NAME ?? "PrescriptionStatusUpdates"
14- const pharmacyPrescriptionIndexName = "PharmacyODSCodePrescriptionIDIndex "
14+ const pharmacyPrescriptionIndexName = "PharmacyODSCodePrescriptionIDIndexPostDatedIndex "
1515
1616export function createPrescriptionLookupKey ( prescriptionID : string , pharmacyODSCode : string ) : string {
1717 return `${ prescriptionID . toUpperCase ( ) } #${ pharmacyODSCode . toUpperCase ( ) } `
You can’t perform that action at this time.
0 commit comments