CareCommunication Test scripts
4.0.0 - release
This page is part of the CareCommunication Testscripts (v4.0.0: Release) based on FHIR (HL7® FHIR® Standard) R4. . For a full list of available versions, see the Directory of published versions
Official URL: http://medcomfhir.dk/ig/carecommunicationtestscript/carecommunication-send-reply-new | Version: 4.0.0 | |||
Active as of 2024-07-15 | Computable Name: CareCommunicationTestScript | |||
Copyright/Legal: MedCom 2023 |
Reply CareCommunication to a CareCommunication that has been forwarded
Generated Narrative: TestScript carecommunication-send-reply-forward
url: TestScript Reply CareCommunication to a CareCommunication that has been forwarded
version: 4.0.0
name: CareCommunicationTestScript
title: Reply CareCommunication to a CareCommunication that has been forwarded
status: Active
date: 2024-07-15
contact: MedCom: mailto:fhir@medcom.dk
description:
Reply CareCommunication to a CareCommunication that has been forwarded
copyright:
MedCom 2023
Index | Profile |
1 | Test script profile origin type FHIR-Client: FHIR Client |
Index | Profile |
1 | Test script profile destination type FHIR-Server: FHIR Server |
fixture
id
create-forward-message-01autocreate: false
autodelete: false
fixture
id
create-reply-message-02autocreate: false
autodelete: false
profile: ??
variable
name: messageHeaderid-forward-message-01
expression: Bundle.entry[0].resource.id
sourceId: create-message-forward-message-01
variable
name: searchParamIdentifier-forward-message
expression: Bundle.entry.resource.ofType(MessageHeader).id
sourceId: create-message-forward-message
variable
name: messageHeaderid-reply-message-02
expression: Bundle.entry[0].resource.id
sourceId: create-message-reply-message-02
variable
name: identifier-forward-message-01
expression: Bundle.entry.resource.ofType(Communication).identifier.value
sourceId: create-message-forward-message-01
variable
name: identifier-reply-message-02
expression: Bundle.entry.resource.ofType(Communication).identifier.value
sourceId: create-message-reply-message-02
test
id
carecommunication-create-forward-message-01name: Create a CareCommunication forward-message Message 01
description: Post CareCommunication to the server.
action
Operations
Type Resource Description Destination EncodeRequestUrl Origin RequestId SourceId Test script operation code create: Create Bundle Post a carecommunication 1 true 1 create-message-forward-message-01 create-forward-message-01 action
Asserts
Description Direction ValidateProfileId WarningOnly Validates the bundle against http://medcomfhir.dk/ig/carecommunication/ImplementationGuide/dk.fhir.ig.dk-medcom-carecommunication request carecommunication false 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 Expression WarningOnly Confirm that the request resource contains the expected eventCoding.code. request Bundle.entry.resource.ofType(MessageHeader).event.as(Coding).select(code = 'care-communication-message').allTrue() false action
Asserts
Description Direction Expression WarningOnly Confirm that the request resource contains the expected activity code. request Bundle.entry.resource.ofType(Provenance).where(activity.coding.code = 'forward-message').exists() 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.contains(%resource.entry[0].resource.id)).exists() false action
Asserts
Description Direction Expression WarningOnly Confirm that the Communication.identifier is a UUID v4. request Bundle.entry.resource.ofType(Communication).identifier.value.matches('urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}') false
test
id
carecommunication-create-reply-message-02name: Create a CareCommunication reply-message Message 02
description: Post CareCommunication to the server.
action
Operations
Type Resource Description Destination EncodeRequestUrl Origin RequestId SourceId Test script operation code create: Create Bundle Post a carecommunication 1 true 1 create-message-reply-message-02 create-reply-message-02 action
Asserts
Description Direction ValidateProfileId WarningOnly Validates the bundle against http://medcomfhir.dk/ig/carecommunication/ImplementationGuide/dk.fhir.ig.dk-medcom-carecommunication request carecommunication false 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 Expression WarningOnly Confirm that the previous MessageHeader.id is identical to Provenance.entity.what request Bundle.entry.resource.ofType(Provenance).where(entity.what.reference.contains('${messageHeaderid-new-message-01}')).exists() 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 = 'care-communication-message').allTrue() false action
Asserts
Description Direction Expression 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.where(role = 'revision').exists() 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.contains(%resource.entry[0].resource.id)).exists() false action
Asserts
Description Direction Expression Operator Value WarningOnly Confirm that the 2 Provenance instances exists. request Bundle.entry.resource.ofType(Provenance).count() equals 2 false action
Asserts
Description Direction Expression WarningOnly Confirm that number of payloads is '2' request Bundle.entry.resource.ofType(Communication).payload.count() = '2' false action
Asserts
Description Direction Expression WarningOnly Confirm that the content is the same in the two messages request '${identifier-forward-message-01}' = '${identifier-reply-message-02}' false