@@ -545,15 +545,16 @@ Feature: Producer - createDocumentReference - Failure Scenarios
545545 | system | value |
546546 | http ://snomed .info /sct | 736253002 |
547547 When producer 'ANGY1' creates a DocumentReference with values:
548- | property | value |
549- | subject | 9278693472 |
550- | status | current |
551- | type_system | http ://invalidsystem .info /sct |
552- | type | 736253002 |
553- | category | 734163000 |
554- | custodian | ANGY1 |
555- | author | HAR1 |
556- | url | https ://example .org /my -doc .pdf |
548+ | property | value |
549+ | subject | 9278693472 |
550+ | status | current |
551+ | type_system | http ://invalidsystem .info /sct |
552+ | type_display | Mental health crisis plan |
553+ | type | 736253002 |
554+ | category | 734163000 |
555+ | custodian | ANGY1 |
556+ | author | HAR1 |
557+ | url | https ://example .org /my -doc .pdf |
557558 Then the response status code is 400
558559 And the response is an OperationOutcome with 1 issue
559560 And the OperationOutcome contains the issue:
@@ -581,14 +582,15 @@ Feature: Producer - createDocumentReference - Failure Scenarios
581582 | system | value |
582583 | http ://snomed .info /sct | 736253002 |
583584 When producer 'ANGY1' creates a DocumentReference with values:
584- | property | value |
585- | subject | 9999999999 |
586- | status | current |
587- | type | invalid |
588- | category | 734163000 |
589- | custodian | ANGY1 |
590- | author | HAR1 |
591- | url | https ://example .org /my -doc .pdf |
585+ | property | value |
586+ | subject | 9999999999 |
587+ | status | current |
588+ | type | invalid |
589+ | type_display | Mental health crisis plan |
590+ | category | 734163000 |
591+ | custodian | ANGY1 |
592+ | author | HAR1 |
593+ | url | https ://example .org /my -doc .pdf |
592594 Then the response status code is 400
593595 And the response is an OperationOutcome with 1 issue
594596 And the OperationOutcome contains the issue:
@@ -714,6 +716,8 @@ Feature: Producer - createDocumentReference - Failure Scenarios
714716 }
715717 }
716718 """
719+ Then the response status code is 400
720+ And the response is an OperationOutcome with 1 issue
717721
718722 Scenario : Missing content
719723 Given the application 'DataShare' (ID 'z00z-y11y-x22x' ) is registered to access the API
@@ -901,43 +905,36 @@ Feature: Producer - createDocumentReference - Failure Scenarios
901905 }
902906 """
903907
904- Scenario : contentType empty string
908+ Scenario : codings with empty string or leading whitespace
905909 Given the application 'DataShare' (ID 'z00z-y11y-x22x' ) is registered to access the API
906910 And the organisation 'TSTCUS' is authorised to access pointer types:
907911 | system | value |
908912 | http ://snomed .info /sct | 736253002 |
909- When producer 'TSTCUS' requests creation of a DocumentReference with default test values except 'content ' is:
913+ When producer 'TSTCUS' requests creation of a DocumentReference with default test values except 'context ' is:
910914 """
911- "content": [
912- {
913- "attachment": {
914- "contentType": "",
915- "url": "https://spine-proxy.national.ncrs.nhs.uk/https%3A%2F%2Fp1.nhs.uk%2FMentalhealthCrisisPlanReport.pdf"
916- },
917- "format": {
918- "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLFormatCode",
919- "code": "urn:nhs-ic:unstructured",
920- "display": "Unstructured Document"
921- },
922- "extension": [
923- {
924- "url": "https://fhir.nhs.uk/England/StructureDefinition/Extension-England-ContentStability",
925- "valueCodeableConcept": {
926- "coding": [
927- {
928- "system": "https://fhir.nhs.uk/England/CodeSystem/England-NRLContentStability",
929- "code": "static",
930- "display": "Static"
931- }
932- ]
933- }
934- }
935- ]
936- }
915+ "context": {
916+ "practiceSetting": {
917+ "coding": [
918+ {
919+ "system": "http://snomed.info/sct",
920+ "code": "788002001",
921+ "display": ""
922+ }
923+ ]
924+ },
925+ "facilityType": {
926+ "coding": [
927+ {
928+ "system": " system",
929+ "code": "1234",
930+ "display": "Tertiary care facility"
931+ }
937932 ]
933+ }
934+ }
938935 """
939936 Then the response status code is 400
940- And the response is an OperationOutcome with 1 issue
937+ And the response is an OperationOutcome with 2 issues
941938 And the OperationOutcome contains the issue:
942939 """
943940 {
@@ -952,9 +949,9 @@ Feature: Producer - createDocumentReference - Failure Scenarios
952949 }
953950 ]
954951 },
955- "diagnostics": "Request body could not be parsed (content [0].attachment.contentType : String should match pattern '[^\\s]+(\\s[^\\s]+)*')",
952+ "diagnostics": "Request body could not be parsed (context.practiceSetting.coding [0].display : String should match pattern '[^\\s]+(\\s[^\\s]+)*')",
956953 "expression": [
957- "content [0].attachment.contentType "
954+ "context.practiceSetting.coding [0].display "
958955 ]
959956 }
960957 """
0 commit comments