HospitalNotification Testscripts
3.0.1 - ci-build

This page is part of the DK MedCom HospitalNotification TestScripts (v3.0.1: Release) based on FHIR 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, both self- and live test. However, 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. They are created using FSH and published using the FHIR publisher.

Before getting started

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

In addition to test scripts based on the use cases, test scripts testing patient flows are included. These test scripts will test different, and in some cases extended flows of the HospitalNotification use cases, that hasn’t been tested in the use case focused tests. They will of course only test within the boundaries of the HospitalNotification standard and governance.

TouchStone and API

Before getting started with test script execution, it is necessary to have an account on TouchStone and to create a test system. Please follow this guide to setup an account and test system.

Abbreviations and naming

Abbreviations:

The term ‘inpatient’ and abbreviation ‘imp’ refers to a patient who is admitted/registered as an inpatient in the hospital’s EHR system (Danish: indlagt), and the term ‘emergency’ and abbreviation ‘emer’ refers to a patient that is registered as acute ambulant in the hospital’s EHR system (Danish: akut ambulant).

The abbreviation ‘tec’ is used when testing the patient flow, to indicate that the test script has a technical character.

The system under test is abbreviated ‘SUT’.

Test script naming:

Most of the send test scripts requires that SUT has executed one or more use cases in advance. These use cases are listed in the ‘Precondition’ columns in the tables.

Use cases: The name of the test scripts is constituted by HospitalNotification_Testscript_[send/receive]-[type]-[imp/emer or alternative flow or precondition], describing the type of messages being sent, or recieved. ‘HospitalNotifciation_Testscript_[send/receive]-‘ is not shown in the naming below.

Patient flows: These will be named HospitalNotification_Testscript_PF-[send/receive]-[imp/emer/tec]-[number]. ‘HospitalNotifciation_Testscript_’ is not shown in the naming below.

Send HospitalNotification test scripts

When sending a HospitalNotification, a POST operation is required for all types of messages, and is therefore valid for both the precondition messages and actual messages being tested.

Use Cases

Test scripts for test of sending use cases, can be found here in TouchStone.

Type Use case
code
Description Type Precondition
Inpatient        
STIN S1 Send: Start hospital stay - admitted STIN  
STIN-A1 S1.A1 Send: Start hospital stay - admitted, without request for a reportOfAdmission STIN  
STOR S3 Send: Start leave STOR STIN
SLOR S4 Send: End leave SLOR STIN, STOR
SLHJ-imp S6 Send: End hospital stay - patient completed to home/primary sector SLHJ STIN
MORS S7 Send: Deceased - dead at arrival to the hospital MORS  
MORS-imp S7 Send: Deceased - deceased during hospital stay MORS STIN
MORS-STOR S7 Send: Deceased - deceased during a period of leave MORS STIN, STOR
Emergency        
STAA S2 Send: Start hospital stay - acute ambulant STAA  
SLHJ-emer S6 Send: End hospital stay - patient completed to home/primary sector SLHJ STAA
MORS-emer S7 Send: Deceased - deceased during hospital stay MORS STAA
Inpatient        
RE_STIN S.CORR Send: Send: Update Start hospital stay - admitted RE_STIN STIN
RE_STOR S.CORR Send: Send: Update Start leave RE_STOR STIN, STOR
RE_SLOR S.CORR Send: Send: Update End leave RE_SLOR STIN, STOR, SLOR
RE_SLHJ-imp S.CORR Send: Send: Update End hospital stay - patient completed to home/primary sector RE_SLHJ STIN, SLHJ
RE_MORS S.CORR Send: Update Deceased - dead at arrival to the hospital RE_MORS MORS
RE_MORS-imp S.CORR Send: Update Deceased - deceased during hospital stay RE_MORS STIN, MORS
RE_MORS-STOR S.CORR Send: Update Deceased - deceased during a period of leave RE_MORS STIN, STOR, MORS
Emergency        
RE_STAA S.CORR Send: Update Start hospital stay - acute ambulant RE_STAA STAA
RE_SLHJ-emer S.CORR Send: Update End hospital stay - patient completed to home/primary sector RE_SLHJ STAA, SLHJ
RE_MORS-emer S.CORR Send: Update Deceased - deceased during acute ambulant RE_MORS STAA, MORS
Inpatient        
AN_STIN S.CANC Send: Cancellation Start hospital stay - admitted AN_STIN STIN
AN_STOR S.CANC Send: Cancellation Start leave AN_STOR STIN, STOR
AN_SLOR S.CANC Send: Cancellation End leave AN_SLOR STIN, STOR, SLOR
AN_SLHJ-imp S.CANC Send: Cancellation End hospital stay - patient completed to home/primary sector AN_SLHJ STIN, SLHJ
AN_MORS S.CANC Send: Cancellation Deceased - dead at arrival to the hospital AN_MORS MORS
AN_MORS-imp S.CANC Send: Cancellation Deceased - deceased during admission AN_MORS STIN, MORS
AN_MORS-STOR S.CANC Send: Cancellation Deceased - deceased during a period of leave AN_MORS STIN, STOR, MORS
Emergency        
AN_STAA S.CANC Send: Cancellation Start hospital stay - acute ambulant AN_STAA STAA
AN_SLHJ-emer S.CANC Send: Cancellation End hospital stay - patient completed to home/primary sector AN_SLHJ STAA, SLHJ
AN_MORS-emer S.CANC Send: Cancellation Deceased - deceased during acute ambulant AN_MORS STAA, MORS

Patient Flow

Test scripts for test of sending patient flows, can be found here in TouchStone.

Type Description Type
Inpatient    
PF-send-imp-01 Send: Admit patient, register patient as being on leave, register patient as returned from leave, discharge patient. STIN, STOR, SLOR, SLHJ
PF-send-imp-02 Send: Admit patient, register patient as being on leave, patient doesn’t return from leave, discharge patient.1 STIN, STOR, SLHJ
PF-send-imp-03 Send: Admit patient, register patient as being on leave, patient returns from leave, patient dies STIN, STOR, SLOR, MORS
PF-send-imp-04 Send: Admit patient, register patient as being on leave, patient returns from leave, * to * x2 STIN, STOR, SLOR, STOR, SLOR
PF-send-imp-05 Send: Admit patient, correct message due to incorrect hospital department STIN, RE_STIN
PF-send-imp-06 Send: Admit patient, correct message due to incorrect time of admission STIN, RE_STIN
Emergency    
PF-send-emer-01 Send: Register patient as acute ambulant, correct message due to incorrect hospital department STAA, RE_STAA
PF-send-emer-02 Send: Register patient as acute ambulant, correct message due to incorrect time of admission STAA, RE_STAA
Emergency/Inpatient    
PF-send-emer/imp-01 Send: Register patient as acute ambulant, admit patient (inpatient), discharge patient STAA, STIN, SLHJ
Technical    
PF-send-tec-01 Send: Cancel a correction: Admit patient, correct admit patient and cancel the correction STIN, RE_STIN, AN_STIN
PF-send-tec-02 Send: Send a message on the 29th of February 2024 (leap year.html) STIN
PF-send-tec-03 Send dublicate: Admit patient, doesn’t get acknowledged, send admit patient. IDs are handled correct STIN, STIN
PF-send-tec-04 Send: Admit patient and End hospital stay in different timezones. Correct use of timezone of summertime (+02:00) and vintertime (+01:00). STIN, SLHJ

Receive HospitalNotification message

When receiving a HospitalNotification, a GET operation is required for all types of messages, valid for both the precondition messages and actual messages being tested.

Test examples/fixtures: Test examples are, in TouchStone testing, called fixtures. These fixtures are uploaded to TouchStone. During setup of a test, all relevant fixtures will be uploadet to the server used during test. From a client application e.g. a vendor’s system, it is possible to request relevant fixture.

HospitalNotifications: Timestamps in most fixtures (HospitalNotifications) are sent between the 28th of February 2023 and 7th of March 2023. The only exception are the fixture used for PF-receive-tec-04 which is on the 28th of February 2023 and the fixture used for PF-receive-tec-05 which is on the 29th of February 2024. All corrections and cancellation messages are sent one hour after the message it revises or cancels.

All fixtures are based on the test patient:

  • Family name: Elmer
  • CPR-nr.: 250947-9989

Placeholders

Placeholders are used in the fixtures. Placeholders are used to ensure uniqueness in a fixture, and to ensure that vendors testing at the same time won’t interfere with eachother.

UUID: Bundle.id will be generate during the test setup. The following line is included in the fixtures. <id value="${UUID}"/> Which results in the following being generated during setup. For instance: <id value="b9b4818e-02de-4cc4-b418-d20cbc399006"/>

GET operation

When searching for a HospitalNotification message, the GET operation requires Bundle.id to search for a specific message.

In the test scripts, the search parameter are: "params": "/${bundleid-STIN}" Which results in the following variable to be used in the GET operation. For instance: http://touchstone.aegis.net:49917/fhir4-0-1/Bundle/88e6c08e-10b6-4c7e-aa70-c0db45933e50

Use Cases

Test scripts for test of the recieving use cases, can be found here in TouchStone.

Type Use case
code
Description Type Precondition
Inpatient        
STIN R1 Receive: Start hospital stay - admitted STIN  
STIN-A1 R1.A1 Receive: Start hospital stay - admitted, without request for reportOfAdmission STIN  
STOR R3 Receive: Start leave STOR STIN
SLOR R4 Receive: End leave SLOR STIN, STOR
SLHJ-imp R6 Receive: End hospital stay - patient completed to home/primary sector SLHJ STIN
MORS R7 Receive: Deceased - is dead at arrival to the hospital MORS  
MORS-imp R7 Receive: Deceased - deceased during hospital stay MORS STIN
MORS-STOR R7 Receive: Deceased - deceased during a period of leave STIN, STOR  
Emergency        
STAA R2 Receive: Start hospital stay - acute ambulant STAA  
SLHJ-emer R6 Receive: End hospital stay - patient completed to home/primary sector SLHJ STAA
MORS-emer R7 Receive: Deceased - deceased during acute ambulant MORS STAA
Inpatient        
RE_STIN R.CORR Receive: Update Start hospital stay RE_STIN STIN
RE_STOR R.CORR Receive: Update Start leave RE_STOR STIN, STOR
RE_SLOR R.CORR Receive: Update End leave RE_SLOR STIN, STOR, SLOR
RE_SLHJ-imp R.CORR Receive: Update End hospital stay – patient completed to home/primary sector RE_SLHJ STIN, SLHJ
RE_MORS R.CORR Receive: Update Deceased - is dead at arrival to the hospital RE_MORS MORS
RE_MORS-imp R.CORR Receive: Update Deceased - deceased during hospital stay RE_MORS STIN, MORS
RE_MORS-STOR R.CORR Receive: Update Deceased - deceased during a period of leave RE_MORS STIN, STOR, MORS
Emergency        
RE_STAA R.CORR Receive: Update Start hospital stay - acute ambulant RE_STAA STAA
RE_SLHJ-emer R.CORR Receive: Update End hospital stay – patient completed to home/primary sector RE_SLHJ STAA, SLHJ
RE_MORS-emer R.CORR Receive: Update Deceased - deceased during acute ambulant STAA, MORS  
Inpatient        
AN_STIN R.CANC Receive: Cancellation Start hospital stay AN_STIN STIN
AN_STOR R.CANC Receive: Cancellation Start leave AN_STOR STIN, STOR
AN_SLOR R.CANC Receive: Cancellation End leave AN_SLOR STIN, STOR, SLOR
AN_SLHJ-imp R.CANC Receive: Cancellation End hospital stay – patient completed to home/primary sector AN_SLHJ STIN, SLHJ
AN_MORS R.CANC Receive: Cancellation Deceased - is dead at arrival to the hospital AN_MORS MORS
AN_MORS-imp R.CANC Receive: Cancellation Deceased - deceased during hospital stay AN_MORS STIN, MORS
AN_MORS-STOR R.CANC Receive: Cancellation Deceased - deceased during a period of leave AN_MORS STIN, STOR, MORS
Emergency        
AN_STAA R.CANC Receive: Cancellation Start hospital stay - acute ambulant AN_STAA STAA
AN_SLHJ-emer R.CANC Receive: Cancellation End hospital stay – patient completed to home/primary sector AN_STOR STAA, SLHJ
AN_MORS-emer R.CANC Receive: Cancellation Deceased - deceased during acute ambulant AN_MORS STAA, MORS

Patient Flow

Test scripts for test of the recieving patient flows, can be found here in TouchStone.

Type Description Type
Inpatient    
PF-receive-imp-01 Receive: Patient is admitted, patient is registered as being on leave, patient returns from leave, patient is discharged STIN, STOR, SLOR, SLHJ
PF-receive-imp-02 Receive: Patient is admitted, patient is registered as being on leave, patient doesn’t return from leave, patient is discharged STIN, STOR, SLHJ
PF-receive-imp-03 Receive: Patient is admitted, patient is registered as being on leave, patient returns from leave, patient is registered as dead STIN, STOR, SLOR, MORS
PF-receive-imp-04 Receive: Patient is admitted, ‘patient is registered as being on leave, patient returns from leave’, ‘ to ‘ x 2 STIN, STOR, SLOR, STOR, SLOR
PF-receive-imp-05 Receive: Patient is admitted, message is corrected due to incorrect hospital department STIN, RE_STIN
PF-receive-imp-06 Receive: Patient is admitted, message is corrected due to incorrect time of admission STIN, RE_STIN
Emergency    
PF-receive-emer-01 Receive: Patient is admitted, message is corrected due to incorrect hospital department STAA, RE_STAA
PF-receive-emer-02 Receive: Patient is admitted, message is corrected due to incorrect time of admission STAA, RE_STAA
Emergency/Inpatient    
PF-receive-emer-imp-01 Receive: Patient is admitted as emergency, patient is admitted as inpatient, patient is discharged STAA, STIN, SLHJ
Technical    
PF-receive-tec-01 Receive dublicate: Patient is admitted, doesn’t get acknowledged, patient is admitted STIN, STIN
PF-receive-tec-02 Receive: Receive cancellation of admit patient: Patient is admitted, correction of admit patient and cancellation admit patient STIN, RE_STIN, AN_STIN
PF-receive-tec-03 Receive: Messages received in wrong order: Patient is admitted as emergency, patient is discharged, patient is admitted as inpatient. STAA, SLHJ, STIN
PF-receive-tec-04 Receive: Receive a message with different timezones (+01:00 and +02:00): Patient is admitted in one timezone, patient is discharged in a different timezone. STIN, SLHJ
PF-receive-tec-05 Receive: Receive a message on the 29th of February 2024 (leap year): Patient is admitted on the date of leap year STIN
PF-receive-tec-06 Receive: Receive a message where the serviceprovider is different from the sender: Patient is admitted STIN
  1. In this flow it is allowed to add a SLOR-message between STOR and SLHJ. In case the system does so, please skip this test script.