Skip to content

Commit 8276137

Browse files
committed
VED-740b: review
1 parent 1873ab3 commit 8276137

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

backend/src/fhir_service.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
logging.basicConfig(level="INFO")
3030
logger = logging.getLogger()
3131

32-
def get_service_url(service_env: str = None, service_base_path: str = None
32+
def get_service_url(service_env: str = os.getenv("IMMUNIZATION_ENV"), service_base_path: str = os.getenv("IMMUNIZATION_BASE_PATH")
3333
) -> str:
34-
service_env: str = service_env if service_env is not None else os.getenv("IMMUNIZATION_ENV", "")
35-
base_path: str = service_base_path or os.getenv("IMMUNIZATION_BASE_PATH")
34+
35+
if not service_base_path:
36+
service_base_path = "immunisation-fhir-api/FHIR/R4"
3637

3738
non_prod = ["internal-dev", "int", "sandbox"]
3839
if service_env in non_prod:
@@ -42,7 +43,7 @@ def get_service_url(service_env: str = None, service_base_path: str = None
4243
else:
4344
subdomain = "internal-dev."
4445

45-
return f"https://{subdomain}api.service.nhs.uk/{base_path}"
46+
return f"https://{subdomain}api.service.nhs.uk/{service_base_path}"
4647

4748

4849
class UpdateOutcome(Enum):

0 commit comments

Comments
 (0)