Skip to content

Commit 76dfe84

Browse files
committed
NRL-1215 recreate reported bug as an integration test
1 parent eed5022 commit 76dfe84

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

tests/features/producer/createDocumentReference-failure.feature

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Invalid document reference - missing custodian identifier
55
# Invalid document reference - missing subject identifier
66
# Invalid document reference - invalid custodian system
7-
# Invalid document reference - invalid subject system
87
# Invalid document reference - invalid relatesTo code
98
# Invalid document reference - invalid relatesTo target
109
# Invalid document reference - multiple type.coding
@@ -570,6 +569,55 @@ Feature: Producer - createDocumentReference - Failure Scenarios
570569
}
571570
"""
572571

572+
Scenario: NRL-1215 Bug report multiple content.attachment urls
573+
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
574+
And the organisation 'TSTCUS' is authorised to access pointer types:
575+
| system | value |
576+
| http://snomed.info/sct | 1363501000000100 |
577+
| http://snomed.info/sct | 736253002 |
578+
When producer 'TSTCUS' requests creation of a DocumentReference with default test values except 'content' is:
579+
"""
580+
"content": [
581+
{
582+
"attachment": {
583+
"contentType": "application/pdf",
584+
"language": "en-UK",
585+
"url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport1.pdf",
586+
"url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport2.pdf",
587+
"title": "Mental health crisis plan report",
588+
"creation": "2022-12-21T10:45:41+11:00"
589+
},
590+
"format": {
591+
"system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
592+
"code": "urn:nhs-ic:unstructured",
593+
"display": "Unstructured document"
594+
}
595+
}
596+
]
597+
"""
598+
Then the response status code is 400
599+
And the response is an OperationOutcome with 1 issue
600+
And the OperationOutcome contains the issue:
601+
"""
602+
{
603+
"severity": "error",
604+
"code": "value",
605+
"details": {
606+
"coding": [
607+
{
608+
"system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
609+
"code": "INVALID_RESOURCE",
610+
"display": "Invalid validation of resource"
611+
}
612+
]
613+
},
614+
"diagnostics": "Invalid practice setting coding: display Ophthalmology service does not match the expected display for 788002001 Practice Setting coding is bound to value set https://fhir.nhs.uk/England/ValueSet/England-PracticeSetting",
615+
"expression": [
616+
"context.practiceSetting.coding[0]"
617+
]
618+
}
619+
"""
620+
573621
Scenario Outline: Invalid display value for type or category (imaging)
574622
Given the application 'DataShare' (ID 'z00z-y11y-x22x') is registered to access the API
575623
And the organisation 'ANGY1' is authorised to access pointer types:

0 commit comments

Comments
 (0)