Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_create_document_reference_happy_path(repository: DocumentPointerReposit
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_create_document_reference_happy_path_with_ssp(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1270,7 +1270,7 @@ def test_create_document_reference_supersede_deletes_old_pointers_replace(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1329,7 +1329,7 @@ def test_create_document_reference_supersede_succeeds_with_toggle(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1444,7 +1444,7 @@ def test_create_document_reference_create_relatesto_not_replaces(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1496,7 +1496,7 @@ def test_create_document_reference_with_date_ignored(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1562,7 +1562,7 @@ def test_create_document_reference_with_date_and_meta_lastupdated_ignored(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1626,7 +1626,7 @@ def test_create_document_reference_with_date_overidden(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
"Location": "/DocumentReference/Y05868-00000000-0000-0000-0000-000000000001",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_upsert_document_reference_happy_path(repository: DocumentPointerReposit
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -105,7 +105,7 @@ def test_upsert_document_reference_happy_path_with_ssp(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -915,7 +915,7 @@ def test_upsert_document_reference_invalid_relatesto_not_exists_still_creates_wi
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1249,7 +1249,7 @@ def test_upsert_document_reference_supersede_deletes_old_pointers_replace(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-111111",
"Location": "/DocumentReference/Y05868-99999-99999-111111",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1307,7 +1307,7 @@ def test_upsert_document_reference_supersede_succeeds_with_toggle(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1421,7 +1421,7 @@ def test_upsert_document_reference_create_relatesto_not_replaces(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-111111",
"Location": "/DocumentReference/Y05868-99999-99999-111111",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1472,7 +1472,7 @@ def test_upsert_document_reference_with_date_ignored(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1534,7 +1534,7 @@ def test_upsert_document_reference_with_date_and_meta_lastupdated_ignored(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down Expand Up @@ -1594,7 +1594,7 @@ def test_upsert_document_reference_with_date_overidden(
assert result == {
"statusCode": "201",
"headers": {
"Location": "/producer/FHIR/R4/DocumentReference/Y05868-99999-99999-999999",
"Location": "/DocumentReference/Y05868-99999-99999-999999",
**default_response_headers(),
},
"isBase64Encoded": False,
Expand Down
2 changes: 1 addition & 1 deletion layer/nrlf/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Source(Enum):
X_CORRELATION_ID_HEADER = "X-Correlation-Id"


PRODUCER_URL_PATH = "/producer/FHIR/R4/DocumentReference"
PRODUCER_URL_PATH = "/DocumentReference"


class PointerTypes(Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -82,7 +82,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
# }
# """
# And the response has a Location header
# And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1'
# And the Location header starts with '/DocumentReference/ANGY1'
# And the resource in the Location header exists with values:
# | property | value |
# | subject | 9278693472 |
Expand Down Expand Up @@ -141,7 +141,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -191,7 +191,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -270,7 +270,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -313,7 +313,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -363,7 +363,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
And the Location header starts with '/DocumentReference/ANGY1-'
And the resource in the Location header exists with values:
| property | value |
| subject | 9278693472 |
Expand Down Expand Up @@ -482,7 +482,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/TSTCUS-'
And the Location header starts with '/DocumentReference/TSTCUS-'
And the resource in the Location header exists with values:
| property | value |
| content[0].attachment.url | https://example.org/doc1.pdf |
Expand Down Expand Up @@ -559,7 +559,7 @@ Feature: Producer - createDocumentReference - Success Scenarios
}
"""
And the response has a Location header
And the Location header starts with '/producer/FHIR/R4/DocumentReference/TSTCUS-'
And the Location header starts with '/DocumentReference/TSTCUS-'
And the resource in the Location header exists with values:
| property | value |
| content[0].attachment.url | https://example.org/incontext-launch.html |
Expand Down
4 changes: 2 additions & 2 deletions tests/features/steps/3_assert.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ def assert_header_starts_with(context: Context, header_name: str, starts_with: s
def assert_resource_in_location_header_exists_with_values(context: Context):
location = context.response.headers.get("Location")

assert location.startswith("/producer/FHIR/R4/DocumentReference/"), format_error(
assert location.startswith("/DocumentReference/"), format_error(
"Unexpected Location header",
"/producer/FHIR/R4/DocumentReference/",
"/DocumentReference/",
location,
context.response.text,
)
Expand Down