Skip to content

Commit f8aa653

Browse files
committed
check lastEvaluatedKey
1 parent 19ba44d commit f8aa653

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

backend/src/fhir_repository.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ def find_immunizations(self, patient_identifier: str, vaccine_types: list):
422422
IndexName="PatientGSI",
423423
KeyConditionExpression=condition
424424
)
425+
if 'LastEvaluatedKey' in response:
426+
print("More rows are available. Use LastEvaluatedKey to paginate.")
427+
else:
428+
print("No more rows.")
425429

426430
logger.info("SAW fi...3.1: Initial DynamoDB query Count: %s, ScannedCount: %s", response.get("Count", 0), response.get("ScannedCount", 0))
427431

0 commit comments

Comments
 (0)