Skip to content

Commit 14852e2

Browse files
platzhershclaude
andauthored
fix: Update EHRBase URL configuration to remove /rest path (#29)
* fix: Remove /rest suffix from EHRBASE_URL to fix double /rest/rest/ in oehrpy requests The oehrpy SDK appends /rest/ to the base URL internally. With the config default including /rest, all EHRBase API calls used /ehrbase/rest/rest/... causing 404 errors for composition creation and AQL queries. https://claude.ai/code/session_01Ekocc3LkbEMZ1DDSVWRQxS * docs: Update PRD to use correct oehrpy base URL without /rest suffix https://claude.ai/code/session_01Ekocc3LkbEMZ1DDSVWRQxS --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 87746f5 commit 14852e2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DEBUG=true
55
DATABASE_URL=postgresql://cis:cis@localhost:5454/cis
66

77
# EHRBase connection - for API service
8-
EHRBASE_URL=http://localhost:8080/ehrbase/rest
8+
EHRBASE_URL=http://localhost:8080/ehrbase
99
EHRBASE_USER=
1010
EHRBASE_PASSWORD=
1111

api/src/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Settings(BaseSettings):
1313
database_url: str = "postgresql://cis:cis@localhost:5432/cis"
1414

1515
# EHRBase (oehrpy client configuration)
16-
ehrbase_url: str = "http://localhost:8080/ehrbase/rest"
16+
ehrbase_url: str = "http://localhost:8080/ehrbase"
1717
ehrbase_user: str | None = None
1818
ehrbase_password: str | None = None
1919
ehrbase_timeout: float = 30.0

docs/prd/0005-oehrpy-sdk-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class Settings(BaseSettings):
373373
database_url: str = "postgresql://..."
374374

375375
# EHRBase (oehrpy client configuration)
376-
ehrbase_url: str = "http://localhost:8080/ehrbase/rest"
376+
ehrbase_url: str = "http://localhost:8080/ehrbase"
377377
ehrbase_user: str = "admin"
378378
ehrbase_password: str = "admin"
379379

@@ -410,7 +410,7 @@ from openehr_sdk.templates import VitalSignsBuilder
410410
async def test_ehrbase_client_connection():
411411
"""Verify oehrpy client can connect to EHRBase."""
412412
async with EHRBaseClient(
413-
base_url="http://localhost:8080/ehrbase/rest",
413+
base_url="http://localhost:8080/ehrbase",
414414
username="admin",
415415
password="admin",
416416
) as client:

0 commit comments

Comments
 (0)