Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/NRLF-638_can_create_with…
Browse files Browse the repository at this point in the history
…_contact_details' into release/2023-08-03
  • Loading branch information
eesa456 committed Aug 3, 2023
2 parents 05fc6bd + f01e1f6 commit 067e846
Showing 1 changed file with 132 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,84 @@ Feature: Producer Create Success scenarios
"date": "$date"
}
"""
Given template DOCUMENT_WITH_CONTACT
"""
{
"resourceType": "DocumentReference",
"id": "$custodian-$identifier",
"custodian": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
"value": "$custodian"
}
},
"subject": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "$subject"
}
},
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "$type"
}
]
},
"content": [
{
"attachment": {
"contentType": "$contentType",
"url": "$url"
}
},
{
"attachment": {
"contentType": "text/html",
"url": "$contactUrl"
}
}
],
"status": "current"
}
"""
Given template DOCUMENT_WITH_CONTACT_ONLY
"""
{
"resourceType": "DocumentReference",
"id": "$custodian-$identifier",
"custodian": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
"value": "$custodian"
}
},
"subject": {
"identifier": {
"system": "https://fhir.nhs.uk/Id/nhs-number",
"value": "$subject"
}
},
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "$type"
}
]
},
"content": [
{
"attachment": {
"contentType": "text/html",
"url": "$contactUrl"
}
}
],
"status": "current"
}
"""
And template OUTCOME
"""
{
Expand Down Expand Up @@ -209,6 +287,60 @@ Feature: Producer Create Success scenarios
| document | <document> |
| created_on | <timestamp> |

Scenario: Successfully create a Document Pointer with content and contact details
Given Producer "Aaron Court Mental Health NH" (Organisation ID "8FW23") is requesting to create Document Pointers
And Producer "Aaron Court Mental Health NH" is registered in the system for application "DataShare" (ID "z00z-y11y-x22x") with pointer types
| system | value |
| http://snomed.info/sct | 736253002 |
When Producer "Aaron Court Mental Health NH" creates a Document Reference from DOCUMENT_WITH_CONTACT template
| property | value |
| identifier | 1234567890 |
| type | 736253002 |
| custodian | 8FW23 |
| subject | 9278693472 |
| contentType | application/pdf |
| url | https://example.org/my-doc.pdf |
| contactUrl | https://example.org/my-contact.html |
Then the operation is successful
And the status is 201
And Document Pointer "8FW23-1234567890" exists
| property | value |
| id | 8FW23-1234567890 |
| nhs_number | 9278693472 |
| producer_id | 8FW23 |
| type | http://snomed.info/sct\|736253002 |
| source | NRLF |
| version | 1 |
| updated_on | NULL |
| document | <document> |
| created_on | <timestamp> |

Scenario: Successfully create a Document Pointer with contact details only
Given Producer "Aaron Court Mental Health NH" (Organisation ID "8FW23") is requesting to create Document Pointers
And Producer "Aaron Court Mental Health NH" is registered in the system for application "DataShare" (ID "z00z-y11y-x22x") with pointer types
| system | value |
| http://snomed.info/sct | 736253002 |
When Producer "Aaron Court Mental Health NH" creates a Document Reference from DOCUMENT_WITH_CONTACT_ONLY template
| property | value |
| identifier | 1234567890 |
| type | 736253002 |
| custodian | 8FW23 |
| subject | 9278693472 |
| contactUrl | https://example.org/my-contact.html |
Then the operation is successful
And the status is 201
And Document Pointer "8FW23-1234567890" exists
| property | value |
| id | 8FW23-1234567890 |
| nhs_number | 9278693472 |
| producer_id | 8FW23 |
| type | http://snomed.info/sct\|736253002 |
| source | NRLF |
| version | 1 |
| updated_on | NULL |
| document | <document> |
| created_on | <timestamp> |

Scenario: Successfully create a Document Pointer when the producer has an extension code
Given Producer "BaRS (EMIS)" (Organisation ID "V4T0L.YGMMC") is requesting to create Document Pointers
And Producer "BaRS (EMIS)" is registered in the system for application "DataShare" (ID "z00z-y11y-x22x") with pointer types
Expand Down

0 comments on commit 067e846

Please sign in to comment.