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-fatal-error-duplicate-hospitalnotification | Version: 2.0.0 | |||
Active as of 2023-05-25 | Responsible: MedCom | Computable Name: AcknowledgementTestScript | ||
Copyright/Legal: MedCom 2023 |
Send duplicate acknowledgement - Fatal Error
Generated Narrative: TestScript
Resource TestScript "acknowledgement-send-fatal-error-duplicate-hospitalnotification"
url: http://medcomfhir.dk/ig/acknowledgementtestscript/acknowledgement-send-fatal-error-duplicate-hospitalnotification
version: 2.0.0
name: AcknowledgementTestScript
title: Send duplicate acknowledgement - Fatal Error
status: active
date: 2023-05-25
publisher: MedCom
contact: MedCom: mailto:fhir@medcom.dk
description: Send duplicate acknowledgement - Fatal 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-fatal-error.xml
fixture
id
create-STIN2-03autocreate: false
autodelete: false
resource: /FHIRSandbox/MedCom/Acknowledgement/draft/Send/Fixtures/HospitalNotification-fixture-STIN-fatal-error.xml
fixture
id
create-fatal-error-02autocreate: false
autodelete: false
resource: /FHIRSandbox/MedCom/Acknowledgement/draft/Send/Fixtures/Acknowledgement-fixture.xml
fixture
id
create-fatal-error-04autocreate: 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
variable
name: destinationUri-STIN2
expression: Bundle.entry.resource.ofType(MessageHeader).destination.endpoint
sourceId: create-STIN2-03
variable
name: bundleid-STIN2-03
expression: Bundle.id
sourceId: create-STIN2-03
variable
name: messageHeaderid-STIN2
expression: Bundle.entry[0].fullUrl
sourceId: create-STIN2-03
variable
name: bundleid-fatal-error-02
expression: Bundle.id
sourceId: create-message-fatal-error-02
variable
name: bundletimestamp-fatal-error-02
expression: Bundle.timestamp
sourceId: create-message-fatal-error-02
variable
name: bundleid-fatal-error-04
expression: Bundle.id
sourceId: create-message-fatal-error-04
variable
name: bundletimestamp-fatal-error-04
expression: Bundle.timestamp
sourceId: create-message-fatal-error-04
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 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-STIN2-03 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-STIN2-03. xml xml true /${bundleid-STIN2-03} create-STIN2-03 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-fatal-error-02name: Create an Acknowledegment fatal-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-fatal-error-02 create-fatal-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 fatal-error request Bundle.entry.resource.ofType(MessageHeader).response.code = 'fatal-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
test
id
message-read-STIN2-03name: Get a STIN2 message 03
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-STIN2-03} 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-fatal-error-04name: Create an Acknowledegment fatal-error Message 04
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-fatal-error-04 create-fatal-error-04 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-STIN2}').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 fatal-error request Bundle.entry.resource.ofType(MessageHeader).response.code = 'fatal-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 action
Asserts
- Description Direction Expression WarningOnly * Confirm that the Bundle.timestamp of the two Acknowledgements are different. request '${bundletimestamp-fatal-error-02}' != '${bundletimestamp-fatal-error-04}' false action
Asserts
- Description Direction Expression WarningOnly * Confirm that the Bundle.id of the two Acknowledgements are different. request '${bundleid-fatal-error-02}' != '${bundleid-fatal-error-04}' false