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

TestScript: Send CareCommunication with sender and recipient

Official URL: http://medcomfhir.dk/ig/carecommunicationtestscript/carecommunication-send-tec-02 Version: 4.0.0
Active as of 2024-07-15 Computable Name: CareCommunicationTestScript

Copyright/Legal: MedCom 2023

Send CareCommunication with sender and recipient

Generated Narrative: TestScript carecommunication-send-tec-02

url: TestScript Send CareCommunication with sender and recipient

version: 4.0.0

name: CareCommunicationTestScript

title: Send CareCommunication with sender and recipient

status: Active

date: 2024-07-15

contact: MedCom: mailto:fhir@medcom.dk

description:

Send CareCommunication with sender and recipient

copyright:

MedCom 2023

Origins

-IndexProfile
*1Test script profile origin type FHIR-Client: FHIR Client

Destinations

-IndexProfile
*1Test script profile destination type FHIR-Server: FHIR Server

fixture

id

create-new-message-01

autocreate: 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-01

name: Create a CareCommunication new-message Message 01

description: Post CareCommunication to the server.

action

Operations

-TypeResourceDescriptionDestinationEncodeRequestUrlOriginRequestIdSourceId
*Test script operation code create: CreateBundlePost a carecommunication1true1create-message-new-message-01create-new-message-01

action

Asserts

-DescriptionDirectionValidateProfileIdWarningOnly
*Validates the bundle against http://medcomfhir.dk/ig/carecommunication/ImplementationGuide/dk.fhir.ig.dk-medcom-carecommunicationrequestcarecommunicationfalse

action

Asserts

-DescriptionDirectionOperatorResponseCodeWarningOnly
*Confirm that the returned HTTP status is okay or created.responsein200,201false

action

Asserts

-DescriptionDirectionResourceWarningOnly
*Confirm that the client request payload contains a Bundle resource type.requestBundlefalse

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Confirm that the request resource contains the expected eventCoding.code.requestBundle.entry.resource.ofType(MessageHeader).event.as(Coding).select(code = 'care-communication-message').allTrue()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Confirm that the request resource contains the expected activity code.requestBundle.entry.resource.ofType(Provenance).where(activity.coding.code = 'new-message').exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Confirm that the target reference in Provenance equals MessageHeader.idrequestBundle.entry.resource.ofType(Provenance).where(target.reference.contains(%resource.entry[0].resource.id)).exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Confirm that the Communication.identifier is a UUID v4.requestBundle.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

-DescriptionDirectionExpressionWarningOnly
*Confirm that a specific sender is includedrequestBundle.entry.resource.ofType(Communication).extension.where(url = 'http://medcomfhir.dk/ig/carecommunication/StructureDefinition/medcom-carecommunication-sender-extension').exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Confirm that a specific recipient is includedrequestBundle.entry.resource.ofType(Communication).recipient.exists()false