@@ -377,3 +377,117 @@ Feature: Producer - createDocumentReference - Success Scenarios
377377 | contentType | application /json +fhir |
378378 | formatCode | urn :nhs -ic :structured |
379379 | formatDisplay | Structured Document |
380+
381+ Scenario : Successfully create a DocumentReference with two contents and different retrieval mechanisms
382+ Given the application 'DataShare' (ID 'z00z-y11y-x22x' ) is registered to access the API
383+ And the organisation 'TSTCUS' is authorised to access pointer types:
384+ | system | value |
385+ | http ://snomed .info /sct | 1363501000000100 |
386+ When producer 'TSTCUS' requests creation of a DocumentReference with default test values except 'content' is:
387+ """
388+ "content": [
389+ {
390+ "attachment": {
391+ "contentType": "application/pdf",
392+ "url": "https://example.org/doc1.pdf"
393+ },
394+ "format": {
395+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
396+ "code": "urn:nhs-ic:unstructured",
397+ "display": "Unstructured Document"
398+ },
399+ "extension": [
400+ {
401+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability",
402+ "valueCodeableConcept": {
403+ "coding": [
404+ {
405+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability",
406+ "code": "static",
407+ "display": "Static"
408+ }
409+ ]
410+ }
411+ },
412+ {
413+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-RetrievalMechanism",
414+ "valueCodeableConcept": {
415+ "coding": [
416+ {
417+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-RetrievalMechanism",
418+ "code": "Direct",
419+ "display": "Direct"
420+ }
421+ ]
422+ }
423+ }
424+ ]
425+ },
426+ {
427+ "attachment": {
428+ "contentType": "application/pdf",
429+ "url": "https://example.org/doc2.pdf"
430+ },
431+ "format": {
432+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
433+ "code": "urn:nhs-ic:unstructured",
434+ "display": "Unstructured Document"
435+ },
436+ "extension": [
437+ {
438+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability",
439+ "valueCodeableConcept": {
440+ "coding": [
441+ {
442+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability",
443+ "code": "static",
444+ "display": "Static"
445+ }
446+ ]
447+ }
448+ },
449+ {
450+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-RetrievalMechanism",
451+ "valueCodeableConcept": {
452+ "coding": [
453+ {
454+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-RetrievalMechanism",
455+ "code": "SSP",
456+ "display": "Spine Secure Proxy"
457+ }
458+ ]
459+ }
460+ }
461+ ]
462+ }
463+ ]
464+ """
465+ Then the response status code is 201
466+ And the response is an OperationOutcome with 1 issue
467+ And the OperationOutcome contains the issue:
468+ """
469+ {
470+ "severity": "information",
471+ "code": "informational",
472+ "details": {
473+ "coding": [
474+ {
475+ "system": "https://fhir.nhs.uk/ValueSet/NRL-ResponseCode",
476+ "code": "RESOURCE_CREATED",
477+ "display": "Resource created"
478+ }
479+ ]
480+ },
481+ "diagnostics": "The document has been created"
482+ }
483+ """
484+ And the response has a Location header
485+ And the Location header starts with '/producer/FHIR/R4/DocumentReference/TSTCUS-'
486+ And the resource in the Location header exists with values:
487+ | property | value |
488+ | content [0 ].attachment .url | https ://example .org /doc1 .pdf |
489+ | content [0 ].extension [1 ].valueCodeableConcept .coding [0 ].code | Direct |
490+ | content [0 ].extension [1 ].valueCodeableConcept .coding [0 ].display | Direct |
491+ | content [1 ].attachment .url | https ://example .org /doc2 .pdf |
492+ | content [1 ].extension [1 ].valueCodeableConcept .coding [0 ].code | SSP |
493+ | content [1 ].extension [1 ].valueCodeableConcept .coding [0 ].display | Spine Secure Proxy |
0 commit comments