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

Testscripts

The test scripts are created by MedCom for testing in TouchStone during MedCom test and certification. The test scripts may be used locally by vendors in their own testsetup, e.g. during code development or test.

Test scripts presented in this IG are all based on the FHIR TestScript resource. TouchStone and an application programming interface (API), e.g. Postman, or the system under test (SUT), are used to execute the test scripts.

Before getting started

Use cases described in the use case document will be referenced throughout this IG and they are the foundation for the tests.

In addition to test scripts based on the use cases, test scripts testing the technical aspects are included. They will focus on the technical tests within the boundaries of the CareCommunication standard and governance. All tests are used to support the test protocols for sending CareCommunications.

TouchStone and API

Before getting started with test script execution, it is necessary to have an account, be a member of MedComs Org Group, and to create a test system in TouchStone. Please follow this guide to setup an account and test system.

Test script naming

Use cases: The name of the test scripts is constituted by CareCommunication_TestScript_[send]-[type], describing the type of messages being sent, for instance CareCommunication_TestScript_send-new-message. ‘CareCommunication_TestScript_’ is not shown in the tables below.

Technical cases: The name of the test scripts is constituted by CareCommunication_TestScript_[send]-[tec]-[number]. For instance CareCommunication_Testscript_send-tec-02. ‘CareCommunication_TestScript_’ is not shown in the tables below.

Test examples

Test examples are, in TouchStone testing, called fixtures. When testing the CareCommunication standard, the fixtures are previously sent CareCommunications. The fixtures are already uploaded to TouchStone. During setup of a test, all relevant fixtures will automatically be uploaded to the server that is used during test. From an API it is possible to request relevant fixtures. Timestamps in fixtures are defined to be added to the fixture when the test is executed.

All fixtures are based on the test patient:

  • Name: Bruno Test Elmer
  • CPR-nr.: 250947-9989

Operations

When sending a CareCommunication, a POST operation is required for all types of messages, and must be used for both the preconditional messages and actual messages being sent. The POST operation should be used from the API or SUT, and each posted message will be validated against the CareCommunication IG. Further, a number of asserts will test for correct concent of the CareCommunication message. The endpoint of the POST operation depends on the setup of the testscript, but it migth be similar to: http://touchstone.aegis.net:49917/fhir4-0-1/Bundle

When receiving a CareCommunication, which is the cases is a precondition, a GET operation must be used from the API or SUT. When using the GET operation a fixture will send from the server, which can be visualized in SUT. The endpoint of the GET operation depends on the setup of the testscript, but it will be composed by the server endpoint, Resource type and id. It migth be similar to http://touchstone.aegis.net:49917/fhir4-0-1/Bundle/b10620cb-e2e6-436e-9185-c35f7e196cea.

Send CareCommunication test scripts

To execute all the test scripts below, both POST and GET operations must be used.

Since it is optional to support sending forwarded CareCommunication, a the test scripts testing these functionalities are marked with * in the tables below.

When executing some of the send test scripts, it is required that SUT has executed one or more use cases in advance by sending a message. These use cases are listed in the ‘Precondition’ columns in the tables.

Use Cases

Test scripts for test of the sending use cases, can be found here in TouchStone or see all sending test scripts in the conformance test suite, which will be used for test and certification. The conformance suite provides a great overview of the executed test scripts.

Type Use case
code
Description Activity Precondition use case
New message        
send-new-message S1 Send CareCommunication.
Receiver is expected to be ‘Klinik for Ældresygdomme, AUH, Skejby’ with SOR-id: 441211000016000
new-message  
send-new-attachment-pdf S1.A1 Send CareCommunication with a pdf as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-png S1.A1 Send CareCommunication with a png as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-bmp S1.A1 Send CareCommunication with a bmp as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-jpeg S1.A1 Send CareCommunication with a jpeg as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-tiff S1.A1 Send CareCommunication with a tiff as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-gif S1.A1 Send CareCommunication with a gif as an attached file .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-link S1.A1 Send CareCommunication with a link as an attachment .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-multiple S1.A1 Send CareCommunication with multiple attached files .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-attachment-author S1.A1 Send CareCommunication with attached files and structured author information; author name and role, and creation date .
Receiver is expected to be ‘Sundhedsplejen, Aabenraa kommune’ with SOR-id: 330461000016004
new-message  
send-new-topic S1.A2 Send CareCommunication with topic.
Receiver is expected to be ‘Lægeklinik Ølgod’ with SOR-id: 1339531000016004
new-message  
send-new-category-other S1.A5 Send CareCommunication with category ‘Other’.
Receiver is expected to be ‘SLB Hjertesygdomme Ambulatorium (Kolding), Kolding Sygehus’ with SOR-id: 349061000016004
new-message  
send-new-priority S1.A6 Send CareCommunication with category ‘Regarding referral’ and included priority.
Receiver is expected to be ‘Pædagogisk Psykologisk Rådgivning, Aalborg kommune’ with SOR-id: 1385391000016002
new-message  
Reply        
send-reply-message S2 Reply CareCommunication reply-message R1
send-reply-attachment S2.A1 Reply CareCommunication where the new message includes attached files reply-message R1
send-reply-add-attachment S2.A1 Reply CareCommunication add new attachments. More than one attachment is expected reply-message R1
send-reply-changecategory S2.A2 Reply CareCommunication with changed category reply-message R1
send-reply-changetopic S2.A2 Reply CareCommunication with changed topic reply-message R1
send-reply-new S2 Reply CareCommunication to a CareCommunication send by the replying system reply-message S1
send-reply-new S2 Reply CareCommunication to a CareCommunication that has been forwarded reply-message S1
reply-oioxmlmessage S2.A3 Reply to OIOXML reply-message R1 (OIOXML-message)
reply-fhirmessage S2.A3 Reply to FHIR message reply-message R1 (FHIR-message)
Forward        
send-forward-message* S3 Forward CareCommunication forward-message R1
send-forward-attachment* S3.A1 Forward CareCommunication where the new message includes attached files forward-message R1
send-forward-add-attachment* S3.A1 Forward CareCommunication and add an attached file forward-message R1
send-forward-changecategory* S3.A2 Forward CareCommunication with changed category forward-message R1
send-forward-changetopic* S3.A2 Forward CareCommunication with changed topic forward-message R1
send-forward-partialthread*1 S3.A3 Forward a part of the CareCommunication thread forward-message R1

Technical cases

Test scripts for test of sending technical cases, can be found here in TouchStone. They are also included in the conformance suite.

Type Description Activity/activities
send-tec-01 Send CareCommunication concerning a deceased patient S1
send-tec-02 Send CareCommunication with sender and recipient S1
send-tec-03 Send CareCommunication where the patient has a CPR-number as identifier S1
send-tec-04 Send CareCommunication where the patient has a replacement-CPR-number as identifier S1
send-tec-05 Send CareCommunication with episodeOfCareID S1
send-tec-06 Reply to CareCommunication, where episodeOfCare-identifier is correctly transfered in the communication R1, S2
send-tec-07 Reply to CareCommunication, that includes all content R1, S2
  1. This test script is only relevant, if the system supports the user can select a specific part of the CareCommunciation to forward.