Name | /FHIRSandbox/DaVinci/FHIR4-0-1-Notifications/01-Process-Message/dv-alerts-r4-02-message-alert-forward-json |
Description | Da Vinci - Notifications - FHIR R4 - 01 Process Message Admit - test to verify a client and server support for the Da Vinci Notifications IG $process-message operation triggered by a notification-admit event using JSON syntax. To set this test up properly, Origin 1 is the original Sender. Origin 2 and Destination 1 should be the same Test System, receiving the message from Origin 1 and Fowarding it on to Destination 2. |
Version | 2 | Latest | 2 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="dv-notifications-r4-01-Process-Message-admit-json"/>
<meta>
<profile value="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Da Vinci - Notifications - FHIR R4 - 01 Process Message Admit - JSON</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/dv-notifications-r4-01-Process-Message-Admit-json"/>
<name value="DaVinciNotificationsR401ProcessMessageAdmitJSON"/>
<title value="Da Vinci - Notifications - FHIR R4 - 01 Process Message Admit - JSON"/>
<status value="active"/>
<date value="2019-08-22"/>
<publisher value="AEGIS.net, Inc."/>
<contact>
<name value="Touchstone Support"/>
<telecom>
<system value="email"/>
<value value="Touchstone_Support@aegis.net"/>
<use value="work"/>
</telecom>
</contact>
<description value="Da Vinci - Notifications - FHIR R4 - 01 Process Message Admit - test to verify a client and server support for the Da Vinci Notifications IG $process-message operation triggered by a notification-admit event using JSON syntax. To set this test up properly, Origin 1 is the original Sender. Origin 2 and Destination 1 should be the same Test System, receiving the message from Origin 1 and Fowarding it on to Destination 2."/>
<copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>
<origin id="Notification Sender (Provider)">
<index value="1"/>
<profile>
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>
<code value="FHIR-Client"/>
</profile>
</origin>
<origin id="Notification Forwarder (Forwarder)">
<index value="2"/>
<profile>
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>
<code value="FHIR-Client"/>
</profile>
</origin>
<destination id="Notification Forwarder">
<index value="1"/>
<profile>
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>
<code value="FHIR-Server"/>
</profile>
</destination>
<destination id="Notification Recipient (Payer)">
<index value="2"/>
<profile>
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>
<code value="FHIR-Server"/>
</profile>
</destination>
<fixture id="comm-request-notification-message">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="./_reference/resources/Bundle-message-forward-01.json"/>
</resource>
</fixture>
<fixture id="comm-request-forward-setup">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="./_reference/resources/Bundle-forward-setup-01.json"/>
</resource>
</fixture>
<profile id="BundleProfile">
<reference value="http://hl7.org/fhir/us/davinci-alerts/StructureDefinition/notifications-bundle"/>
</profile>
<test id="01-SendMessageAdmit">
<name value="ProcessMessageAdmit"/>
<description value="Test Da Vinci Notifications $process-message operation for a Notification Admit event. The request payload is sent to the intermediary in this test step."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="process-message"/>
</type>
<description value="Test Da Vinci Notifications $process-message operation with HTTP Header Accept set to JSON format."/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="/$process-message"/>
<requestId value="initialMessage"/>
<sourceId value="comm-request-forward-setup"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK). The FHIR specification defines 202 and 204 as proper responses as well, so any of those values are considered passing."/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200,202,204"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="02-FowardMessageAdmit">
<name value="ForwardMessageAdmit"/>
<description value="Test Da Vinci Notifications $process-message operation for a Notification Admit event. The request message received from test 1 is fowarded to the final destination system."/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="process-message"/>
</type>
<description value="Test Da Vinci Notifications $process-message operation with HTTP Header Accept set to JSON format."/>
<accept value="json"/>
<contentType value="json"/>
<destination value="2"/>
<encodeRequestUrl value="true"/>
<origin value="2"/>
<params value="/$process-message"/>
<sourceId value="comm-request-notification-message"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200(OK). The FHIR specification defines 202 and 204 as proper responses as well, so any of those values are considered passing."/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200,202,204"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the client request included a Content-Type of the FHIR JSON format."/>
<direction value="request"/>
<contentType value="json"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the client request payload contains a Bundle resource type."/>
<direction value="request"/>
<resource value="Bundle"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource first entry contains the expected MessageHeader.eventCoding.code element and value."/>
<direction value="request"/>
<operator value="equals"/>
<path value="$.entry[0].resource.eventCoding.code"/>
<value value="notification-admit"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle correctly changed the Bundle.id value."/>
<direction value="request"/>
<compareToSourceId value="initialMessage"/>
<compareToSourcePath value="$.id"/>
<operator value="notEquals"/>
<path value="$.id"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource first entry correctly changed the MessageHeader.id value."/>
<direction value="request"/>
<compareToSourceId value="initialMessage"/>
<compareToSourcePath value="$.entry[0].resource.id"/>
<operator value="notEquals"/>
<path value="$.entry[0].resource.id"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource first entry correctly changed the MessageHeader.sender value."/>
<direction value="request"/>
<compareToSourceId value="initialMessage"/>
<compareToSourcePath value="$.entry[0].resource.sender.reference"/>
<operator value="notEquals"/>
<path value="$.entry[0].resource.sender.reference"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource first entry correctly changed the MessageHeader.destination value."/>
<direction value="request"/>
<compareToSourceId value="initialMessage"/>
<compareToSourcePath value="$.entry[0].resource.destination[0].endpoint"/>
<operator value="notEquals"/>
<path value="$.entry[0].resource.destination[0].endpoint"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource to contain an expected Provenance.agent for the Sender with type = 'author'."/>
<direction value="request"/>
<operator value="in"/>
<path value="$.entry[?(@.resource.resourceType == 'Provenance')].resource.agent[*].type.coding[?(@.code == 'author')].code"/>
<value value="author"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Confirm that the forwarded Bundle resource to contain an expected Provenance.agent for the Intermediary with type = 'assembler' or 'transmitter'."/>
<direction value="request"/>
<operator value="in"/>
<path value="$.entry[?(@.resource.resourceType == 'Provenance')].resource.agent[*].type.coding[?(@.code in ['assembler','transmitter'])].code"/>
<value value="assembler,transmitter"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<extension url="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail">
<valueBoolean value="false"/>
</extension>
<description value="Validate that the client request payload Bundle resource contents conforms to the Da Vinci Notifications IG."/>
<direction value="request"/>
<validateProfileId value="BundleProfile"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>