@@ -418,19 +418,16 @@ Feature: Producer - createDocumentReference - Failure Scenarios
418418 "content": [
419419 {
420420 "attachment": {
421- "contentType": "text/html",
422- "language": "en-US",
423- "url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf",
424- "size": 3654,
425- "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
426- "title": "Mental health crisis plan report",
427- "creation": "2022-12-21T10:45:41+11:00"
421+ "contentType": "text/html",
422+ "url": "someContact.co.uk"
428423 },
429424 "format": {
430- "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
431- "code": "urn:nhs-ic:unstructured",
432- "display": "Unstructured Documents"
425+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
426+ "code": "urn:nhs-ic:unstructured",
427+ "display": "Unstructured document"
428+ }
433429 }
430+ ]
434431 """
435432 Then the response status code is 400
436433 And the response is an OperationOutcome with 1 issue
@@ -440,17 +437,17 @@ Feature: Producer - createDocumentReference - Failure Scenarios
440437 "severity": "error",
441438 "code": "value",
442439 "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- ]
440+ "coding": [
441+ {
442+ "system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
443+ "code": "INVALID_RESOURCE",
444+ "display": "Invalid validation of resource"
445+ }
446+ ]
450447 },
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' ",
448+ "diagnostics": "Invalid content format code: urn:nhs-ic:unstructured format code must be 'urn:nhs-ic:record-contact' for Contact details attachments. ",
452449 "expression": [
453- "category.coding [0].code"
450+ "content [0].format .code"
454451 ]
455452 }
456453 """
@@ -466,19 +463,20 @@ Feature: Producer - createDocumentReference - Failure Scenarios
466463 "content": [
467464 {
468465 "attachment": {
469- "contentType": "application/pdf",
470- "language": "en-US",
471- "url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf",
472- "size": 3654,
473- "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
474- "title": "Mental health crisis plan report",
475- "creation": "2022-12-21T10:45:41+11:00"
466+ "contentType": "application/pdf",
467+ "language": "en-UK",
468+ "url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf",
469+ "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk=",
470+ "title": "Mental health crisis plan report",
471+ "creation": "2022-12-21T10:45:41+11:00"
476472 },
477473 "format": {
478- "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
479- "code": "urn:nhs-ic:record-contact",
480- "display": "Contact details"
474+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
475+ "code": "urn:nhs-ic:record-contact",
476+ "display": "Contact details"
477+ }
481478 }
479+ ]
482480 """
483481 Then the response status code is 400
484482 And the response is an OperationOutcome with 1 issue
@@ -488,17 +486,17 @@ Feature: Producer - createDocumentReference - Failure Scenarios
488486 "severity": "error",
489487 "code": "value",
490488 "details": {
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- ]
489+ "coding": [
490+ {
491+ "system": "https://fhir.nhs.uk/ValueSet/Spine-ErrorOrWarningCode-1",
492+ "code": "INVALID_RESOURCE",
493+ "display": "Invalid validation of resource"
494+ }
495+ ]
498496 },
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' ",
497+ "diagnostics": "Invalid content format code: urn:nhs-ic:record-contact format code must be 'urn:nhs-ic:unstructured' for Unstructured Document attachments. ",
500498 "expression": [
501- "category.coding [0].code"
499+ "content [0].format .code"
502500 ]
503501 }
504502 """
0 commit comments