@@ -223,6 +223,10 @@ Feature: Producer - createDocumentReference - Success Scenarios
223223 | pointer -type | pointer -category | type -name |
224224 | 824321000000109 | 823651000000106 | SUMMARY_RECORD |
225225
226+ Examples : Record Artifacts
227+ | pointer -type | pointer -category | type -name |
228+ | 749001000000101 | 419891008 | APPOINTMENT |
229+
226230 # Create with content and contact details
227231 # Create with contact details only
228232 # Create with multiple attachments
@@ -319,3 +323,56 @@ Feature: Producer - createDocumentReference - Success Scenarios
319323 | custodian | ANGY1 |
320324 | author | HAR1 |
321325 | url | https ://example .org /my -doc .pdf |
326+
327+ Scenario Outline : Successfully create a BaRS Appointment pointer
328+ Given the application 'DataShare' (ID 'z00z-y11y-x22x' ) is registered to access the API
329+ And the organisation 'BARS1' is authorised to access pointer types:
330+ | system | value |
331+ | http ://snomed .info /sct | 749001000000101 |
332+ When producer 'BARS1' creates a DocumentReference with values:
333+ | property | value |
334+ | subject | 9278693472 |
335+ | status | current |
336+ | type | 749001000000101 |
337+ | category | 419891008 |
338+ | custodian | BARS1 |
339+ | author | HAR0 |
340+ | url | https ://example .org /appt -link |
341+ | practiceSetting | 394802001 |
342+ | contentType | application /json +fhir |
343+ | formatCode | urn :nhs -ic :structured |
344+ | formatDisplay | Structured Document |
345+ Then the response status code is 201
346+ And the response is an OperationOutcome with 1 issue
347+ And the OperationOutcome contains the issue:
348+ """
349+ {
350+ "severity": "information",
351+ "code": "informational",
352+ "details": {
353+ "coding": [
354+ {
355+ "system": "https://fhir.nhs.uk/ValueSet/NRL-ResponseCode",
356+ "code": "RESOURCE_CREATED",
357+ "display": "Resource created"
358+ }
359+ ]
360+ },
361+ "diagnostics": "The document has been created"
362+ }
363+ """
364+ And the response has a Location header
365+ And the Location header starts with '/producer/FHIR/R4/DocumentReference/ANGY1-'
366+ And the resource in the Location header exists with values:
367+ | property | value |
368+ | subject | 9278693472 |
369+ | status | current |
370+ | type | 749001000000101 |
371+ | category | 419891008 |
372+ | custodian | BARS1 |
373+ | author | HAR0 |
374+ | url | https ://example .org /appt -link |
375+ | practiceSetting | 394802001 |
376+ | contentType | application /json +fhir |
377+ | formatCode | urn :nhs -ic :structured |
378+ | formatDisplay | Structured Document |
0 commit comments