Acknowledgement Test scripts
2.0.0 - release
This page is part of the DK MedCom Acknowledgement TestScripts (v2.0.0: Release) based on FHIR R4. . For a full list of available versions, see the Directory of published versions
Official URL: http://medcomfhir.dk/ig/acknowledgementtestscript/acknowledgement-send-transient-error-hospitalnotification | Version: 2.0.0 | |||
Active as of 2023-05-25 | Responsible: MedCom | Computable Name: AcknowledgementTestScript | ||
Copyright/Legal: MedCom 2023 |
Send acknowledgement - Transient Error
Generated Narrative: TestScript
Resource TestScript "acknowledgement-send-transient-error-hospitalnotification"
url: http://medcomfhir.dk/ig/acknowledgementtestscript/acknowledgement-send-transient-error-hospitalnotification
version: 2.0.0
name: AcknowledgementTestScript
title: Send acknowledgement - Transient Error
status: active
date: 2023-05-25
publisher: MedCom
contact: MedCom: mailto:fhir@medcom.dk
description: Send acknowledgement - Transient Error
copyright: MedCom 2023
- | Index | Profile |
* | 1 | FHIR Client (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types code FHIR-Client = 'FHIR Client', stated as 'null') |
- | Index | Profile |
* | 1 | FHIR Server (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types code FHIR-Server = 'FHIR Server', stated as 'null') |
fixture
id
create-STIN-01autocreate: false
autodelete: false
resource: /FHIRSandbox/MedCom/Acknowledgement/draft/Send/Fixtures/HospitalNotification-fixture-STIN-transient-error.xml
fixture
id
create-transient-error-02autocreate: false
autodelete: false
resource: /FHIRSandbox/MedCom/Acknowledgement/draft/Send/Fixtures/Acknowledgement-fixture.xml
profile: http://medcomfhir.dk/ig/acknowledgement/StructureDefinition/medcom-messaging-acknowledgement "MedComAcknowledgementMessage"
variable
name: destinationUri-STIN
expression: Bundle.entry.resource.ofType(MessageHeader).destination.endpoint
sourceId: create-STIN-01
variable
name: bundleid-STIN-01
expression: Bundle.id
sourceId: create-STIN-01
variable
name: messageHeaderid-STIN
expression: Bundle.entry[0].fullUrl
sourceId: create-STIN-01
setup
action
Operations
- Type Resource Description Accept EncodeRequestUrl Params * Delete (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code delete = 'Delete', stated as 'null') Bundle System-generated search and delete operations from conditional delete on Bundle MessageHeader.destination.endpoint xml true ?message.destination-uri=${destinationUri-STIN} action
Operations
- Type Resource Description Accept ContentType EncodeRequestUrl SourceId * Create (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code create = 'Create', stated as 'null') Bundle Create the Bundle resource in XML format on the destination server. xml xml true create-STIN-01 action
Operations
- Type Resource Description Accept ContentType EncodeRequestUrl Params SourceId * Create using Update (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code updateCreate = 'Create using Update', stated as 'null') Bundle Update the Bundle.id in XML format on the destination server, so it corresponds to $bundleid-STIN-01. xml xml true /${bundleid-STIN-01} create-STIN-01 action
Asserts
- Description Direction Operator ResponseCode WarningOnly * Confirm that the returned HTTP status is okay or created. response in 200,201 false
test
id
message-read-STIN-01name: Get a STIN message 01
description: GET a message. The expected response is a 200(OK) with a payload of the message resource in XML format.
action
Operations
- Type Resource Description Accept Destination EncodeRequestUrl Origin Params * Read (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code read = 'Read', stated as 'null') Bundle Receive message xml 1 true 1 /${bundleid-STIN-01} action
Asserts
- Description Direction Operator ResponseCode WarningOnly * Confirm that the returned HTTP status is okay or created. response in 200,201 false
test
id
message-create-transient-error-02name: Create an Acknowledegment transient-error Message 02
description: Post Acknowledegment to the server.
action
Operations
- Type Resource Description Destination EncodeRequestUrl Origin RequestId SourceId * Create (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code create = 'Create', stated as 'null') Bundle Post an Acknowledegment 1 true 1 create-message-transient-error-02 create-transient-error-02 action
Asserts
- Description Direction Operator ResponseCode WarningOnly * Confirm that the returned HTTP status is okay or created. response in 200,201 false action
Asserts
- Description Direction Resource WarningOnly * Confirm that the client request payload contains a Bundle resource type. request Bundle false action
Asserts
- Description Direction ValidateProfileId WarningOnly * Validates the bundle against http://medcomfhir.dk/ig/acknowledgement/StructureDefinition/medcom-messaging-acknowledgement request acknowledgement false action
Asserts
- Description Direction Expression WarningOnly * Confirm that the previous MessageHeader fullURL is identical to Provenance.entity.what request Bundle.entry.resource.ofType(Provenance).where(entity.what.reference = '${messageHeaderid-STIN}').count() = 1 false action
Asserts
- Description Direction Expression WarningOnly * Confirm that the request resource contains the expected eventCoding.code. request Bundle.entry.resource.ofType(MessageHeader).event.as(Coding).select(code = 'acknowledgement-message').allTrue() false action
Asserts
- Description Direction Expression WarningOnly * Confirm that MessageHeader.responseCode equals to transient-error request Bundle.entry.resource.ofType(MessageHeader).response.code = 'transient-error' false action
Asserts
- Description Direction Expression WarningOnly * Confirm that a OperationOutcome instance is included, when the responseCode is 'transient-error' or 'fatal-error' request Bundle.entry.resource.ofType(MessageHeader).response.code = 'ok' or ((Bundle.entry.resource.ofType(MessageHeader).response.code = 'transient-error' or Bundle.entry.resource.ofType(MessageHeader).response.code = 'fatal-error') and Bundle.entry.resource.ofType(OperationOutcome).exists()) false action
Asserts
- Description Direction Expression Operator Value WarningOnly * Confirm that the role is set to revision. Not used when testing the first message in a stream request Bundle.entry.resource.ofType(Provenance).entity.role equals revision false action
Asserts
- Description Direction Expression WarningOnly * Confirm that the target reference in Provenance equals MessageHeader.id request Bundle.entry.resource.ofType(Provenance).where(target.reference = %resource.entry[0].fullUrl).exists() false action
Asserts
- Description Direction Expression WarningOnly * Confirm that 2 Provenance instances exists. request Bundle.entry.resource.ofType(Provenance).count() = 2 false action
Asserts
- Description Direction Expression WarningOnly * Confirm that the one Provenance instance contains the expected activity code. request Bundle.entry.resource.ofType(Provenance).where(activity.coding.code = 'acknowledgement').count() = 1 false