Name | /FHIRSandbox/DaVinci/FHIR4-0-1-Notifications/01-Process-Message/dv-alerts-r4-02-message-alert-discharge-json |
Description | Da Vinci - Notifications - FHIR R4 - 01 Process Message Discharge - test to verify a client and server support for the Da Vinci Notifications IG $process-message operation triggered by a notification-discharge event using JSON syntax. |
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-discharge-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 Discharge - JSON</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir4-0-0/TestScript/dv-notifications-r4-01-Process-Message-Discharge-json"/>
<name value="DaVinciNotificationsR401MessageNotificationDischargeJSON"/>
<title value="Da Vinci - Notifications - FHIR R4 - 01 Process Message discharge - 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 Discharge - test to verify a client and server support for the Da Vinci Notifications IG $process-message operation triggered by a notification-discharge event using JSON syntax."/>
<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>
<destination id="Notification Recipient (Payer)">
<index value="1"/>
<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-discharge-01.json"/>
</resource>
</fixture>
<profile id="BundleProfile">
<reference value="http://hl7.org/fhir/us/davinci-alerts/StructureDefinition/notifications-bundle"/>
</profile>
<test id="01-ProcessMessageDischarge">
<name value="ProcessMessageDischarge"/>
<description value="Test Da Vinci Notifications $process-message operation for a Notification Discharge event. The request payload will validate the Bundle sent where the expected response code is 200 OK and response payload is a valid Notifications transaction Bundle using JSON syntax."/>
<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"/>
<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 sent 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-discharge"/>
<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>