CareCommunication Test scripts
4.0.1 - release
This page is part of the CareCommunication Testscripts (v4.0.1: 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-new-attachment-gif | Version: 4.0.1 | |||
Active as of 2024-07-15 | Computable Name: CareCommunicationTestScript | |||
Copyright/Legal: MedCom 2023 |
Send CareCommunication with a gif as an attached file. Receiver is expected to be 'Sundhedsplejen, Aabenraa kommune' with SOR-id: 330461000016004.
Generated Narrative: TestScript carecommunication-send-new-attachment-gif
version: 4.0.1
name: CareCommunicationTestScript
title: Send CareCommunication with a gif as an attached file. Receiver is expected to be 'Sundhedsplejen, Aabenraa kommune' with SOR-id: 330461000016004.
status: Active
date: 2024-07-15
contact: MedCom: mailto:fhir@medcom.dk
description:
Send CareCommunication with a gif as an attached file. Receiver is expected to be 'Sundhedsplejen, Aabenraa kommune' with SOR-id: 330461000016004.
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-new-message-01autocreate: false
autodelete: false
resource: /Fixtures/CareCommunication-fixture.xml
profile: ??
variable
name: messageHeaderid-new-message-01
expression: Bundle.entry[0].resource.id
sourceId: create-message-new-message-01
variable
name: searchParamIdentifier-new-message
expression: Bundle.entry.resource.ofType(MessageHeader).id
sourceId: create-message-new-message
test
id
carecommunication-create-new-message-01name: Create a CareCommunication new-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-new-message-01 create-new-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 = 'new-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 action
Asserts
Description Direction Expression WarningOnly Confirm that an attachment of the type 'image/gif' is included request Bundle.entry.resource.ofType(Communication).payload.content.where(contentType = 'image/gif').data.exists() false action
Asserts
Description Direction Expression WarningOnly Confirm that the receiver EAN-number is 5790001353308 request Bundle.entry.resource.ofType(MessageHeader).destination.receiver.reference.resolve().identifier.where(system = 'https://www.gs1.org/gln').value = '5790001353308' false action
Asserts
Description Direction Expression WarningOnly Confirm that the receiver SOR-id is 330461000016004 request Bundle.entry.resource.ofType(MessageHeader).destination.receiver.reference.resolve().identifier.where(system = 'urn:oid:1.2.208.176.1.1').value = '330461000016004' false