@@ -491,3 +491,80 @@ Feature: Producer - createDocumentReference - Success Scenarios
491491 | content [1 ].attachment .url | https ://example .org /doc2 .pdf |
492492 | content [1 ].extension [1 ].valueCodeableConcept .coding [0 ].code | SSP |
493493 | content [1 ].extension [1 ].valueCodeableConcept .coding [0 ].display | Spine Secure Proxy |
494+
495+ Scenario : Successfully create a Document Pointer with InContext retrieval mechanism and structured format
496+ Given the application 'DataShare' (ID 'z00z-y11y-x22x' ) is registered to access the API
497+ And the organisation 'TSTCUS' is authorised to access pointer types:
498+ | system | value |
499+ | http ://snomed .info /sct | 1363501000000100 |
500+ When producer 'TSTCUS' requests creation of a DocumentReference with default test values except 'content' is:
501+ """
502+ "content": [
503+ {
504+ "attachment": {
505+ "contentType": "text/html",
506+ "url": "https://example.org/incontext-launch.html"
507+ },
508+ "format": {
509+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
510+ "code": "urn:nhs-ic:structured",
511+ "display": "Structured Document"
512+ },
513+ "extension": [
514+ {
515+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability",
516+ "valueCodeableConcept": {
517+ "coding": [
518+ {
519+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability",
520+ "code": "dynamic",
521+ "display": "Dynamic"
522+ }
523+ ]
524+ }
525+ },
526+ {
527+ "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-RetrievalMechanism",
528+ "valueCodeableConcept": {
529+ "coding": [
530+ {
531+ "system": "https://fhir.nhs.uk/England/CodeSystem/England-RetrievalMechanism",
532+ "code": "InContext",
533+ "display": "Direct using In-Context"
534+ }
535+ ]
536+ }
537+ }
538+ ]
539+ }
540+ ]
541+ """
542+ Then the response status code is 201
543+ And the response is an OperationOutcome with 1 issue
544+ And the OperationOutcome contains the issue:
545+ """
546+ {
547+ "severity": "information",
548+ "code": "informational",
549+ "details": {
550+ "coding": [
551+ {
552+ "system": "https://fhir.nhs.uk/ValueSet/NRL-ResponseCode",
553+ "code": "RESOURCE_CREATED",
554+ "display": "Resource created"
555+ }
556+ ]
557+ },
558+ "diagnostics": "The document has been created"
559+ }
560+ """
561+ And the response has a Location header
562+ And the Location header starts with '/producer/FHIR/R4/DocumentReference/TSTCUS-'
563+ And the resource in the Location header exists with values:
564+ | property | value |
565+ | content [0 ].attachment .url | https ://example .org /incontext -launch .html |
566+ | content [0 ].attachment .contentType | text /html |
567+ | content [0 ].format .code | urn :nhs -ic :structured |
568+ | content [0 ].format .display | Structured Document |
569+ | content [0 ].extension [1 ].valueCodeableConcept .coding [0 ].code | InContext |
570+ | content [0 ].extension [1 ].valueCodeableConcept .coding [0 ].display | Direct using In -Context |
0 commit comments