Skip to content

Commit

Permalink
[PRMP-1242] refactored boolean logic for PDS API stubbing
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyFlintNHS committed Nov 21, 2024
1 parent 11e48b5 commit 07489c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lambdas/utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def create_reference_id() -> str:


def get_pds_service() -> PatientSearch:
if os.getenv("PDS_FHIR_IS_STUBBED") not in ["False", "false"]:
if os.getenv("PDS_FHIR_IS_STUBBED") in ["False", "false"]:
ssm_service = SSMService()
auth_service = NhsOauthService(ssm_service)
return PdsApiService(ssm_service, auth_service)
else:
return MockPdsApiService()

ssm_service = SSMService()
auth_service = NhsOauthService(ssm_service)
return PdsApiService(ssm_service, auth_service)


def redact_id_to_last_4_chars(str_id: str) -> str:
return str_id[-4:]
Expand Down

0 comments on commit 07489c7

Please sign in to comment.