Skip to content

Commit 37aed66

Browse files
committed
NRL-502 fix tests
1 parent a8c0352 commit 37aed66

File tree

3 files changed

+38
-18
lines changed

3 files changed

+38
-18
lines changed

tests/features/consumer/readDocumentReference-success.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ Feature: Consumer - readDocumentReference - Success Scenarios
6969
"attachment": {
7070
"contentType": "application/pdf",
7171
"url": "https://example.org/my-doc.pdf"
72+
},
73+
"format": {
74+
"system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
75+
"code": "urn:nhs-ic:unstructured",
76+
"display": "Unstructured document"
7277
}
7378
}
7479
],
@@ -155,6 +160,11 @@ Feature: Consumer - readDocumentReference - Success Scenarios
155160
"attachment": {
156161
"contentType": "application/pdf",
157162
"url": "https://example.org/my-doc.pdf"
163+
},
164+
"format": {
165+
"system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
166+
"code": "urn:nhs-ic:unstructured",
167+
"display": "Unstructured document"
158168
}
159169
}
160170
],

tests/features/producer/createDocumentReference-failure.feature

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -440,16 +440,18 @@ Feature: Producer - createDocumentReference - Failure Scenarios
440440
"severity": "error",
441441
"code": "value",
442442
"details": {
443-
"coding": [
444-
{
445-
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
446-
"code": "INVALID_RESOURCE",
447-
"display": "Invalid validation of resource",
448-
}
449-
]
443+
"coding": [
444+
{
445+
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
446+
"code": "INVALID_RESOURCE",
447+
"display": "Invalid validation of resource"
448+
}
449+
]
450450
},
451-
"diagnostics": "Invalid content format code: urn:nhs-ic:unstructured format code must be 'urn:nhs-ic:record-contact' for Contact details attachments.",
452-
"expression": ["content[0].format.code"]
451+
"diagnostics": "The Category code of the provided document 'http://snomed.info/sct|1102421000000108' must match the allowed category for pointer type 'http://snomed.info/sct|736253002' with a category value of 'http://snomed.info/sct|734163000'",
452+
"expression": [
453+
"category.coding[0].code"
454+
]
453455
}
454456
"""
455457

@@ -482,19 +484,22 @@ Feature: Producer - createDocumentReference - Failure Scenarios
482484
And the response is an OperationOutcome with 1 issue
483485
And the OperationOutcome contains the issue:
484486
"""
487+
{
485488
"severity": "error",
486489
"code": "value",
487490
"details": {
488-
"coding": [
489-
{
490-
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
491-
"code": "INVALID_RESOURCE",
492-
"display": "Invalid validation of resource",
493-
}
494-
]
491+
"coding": [
492+
{
493+
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
494+
"code": "INVALID_RESOURCE",
495+
"display": "Invalid validation of resource"
496+
}
497+
]
495498
},
496-
"diagnostics": "Invalid content format code: urn:nhs-ic:record-contact format code must be 'urn:nhs-ic:unstructured' for Unstructured Document attachments.",
497-
"expression": ["content[0].format.code"],
499+
"diagnostics": "The Category code of the provided document 'http://snomed.info/sct|1102421000000108' must match the allowed category for pointer type 'http://snomed.info/sct|736253002' with a category value of 'http://snomed.info/sct|734163000'",
500+
"expression": [
501+
"category.coding[0].code"
502+
]
498503
}
499504
"""
500505

tests/features/producer/readDocumentReference-success.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ Feature: Producer - readDocumentReference - Success Scenarios
7171
"attachment": {
7272
"contentType": "application/pdf",
7373
"url": "https://example.org/my-doc.pdf"
74+
},
75+
"format": {
76+
"system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
77+
"code": "urn:nhs-ic:unstructured",
78+
"display": "Unstructured document"
7479
}
7580
}
7681
],

0 commit comments

Comments
 (0)