Test Script

Name/FHIRSandbox/DaVinci/FHIR4-0-1-PAS/PAS-1-0-0/02-Subscription/01-Rest-Hooks/00-RestHookSubscriptionSetup
Descriptionsetup for testing Rest Hook Subscriptions as defined in DaVinci PAS IG. authorizationResponseId = claimResponse.identifier PatientIdentifier = claimResponse.patient.identifier redirectURL = url the empty POST will be sent to in order to notify of a change in the subscription criteria; should be the Touchstone proxy url for the actual endpoint so the empty POST goes through Touchstone TS_Header = the header Touchstone requires to match a request to a test execution (i.e. USER_KEY: ZRFwMBrm0Iy2t7c6n3y) origin 1: client creating Subscription resource destination 1: server receiving Subscription resource (which should be the server that will have the claimResponse resource created/updated on it)
Version1Latest1
Content
<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">  
    <id value="RestHookSubscriptionSetup"/>  
    <url value="http://wildfhir.aegis.net/FHIRSandbox/DaVinci/FHIR4-0-1-PAS/02-Subscription/01-Rest-Hooks/00-RestHookSubscriptionSetup.xml"/>  
    <name value="RestHookSubscriptionSetup"/>  
    <status value="active"/>  
    <date value="2020-01-27"/>  
    <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="setup for testing Rest Hook Subscriptions as defined in DaVinci PAS IG.    authorizationResponseId = claimResponse.identifier   PatientIdentifier = claimResponse.patient.identifier   redirectURL = url the empty POST will be sent to in order to notify of a change in the subscription criteria; should be the Touchstone proxy url for the actual endpoint so the empty POST goes through Touchstone   TS_Header = the header Touchstone requires to match a request to a test execution (i.e. USER_KEY: ZRFwMBrm0Iy2t7c6n3y)    origin 1: client creating Subscription resource   destination 1: server receiving Subscription resource (which should be the server that will have the claimResponse resource created/updated on it)"/>  
    <copyright value="This FHIR Test Script is licensed under Creative Commons (CC0) 'No Rights Reserved'. Learn more at https://creativecommons.org/licenses"/>  
    <origin> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>  
            <code value="FHIR-Client"/> 
        </profile> 
    </origin>  
    <destination> 
        <index value="1"/>  
        <profile> 
            <system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>  
            <code value="FHIR-Server"/> 
        </profile> 
    </destination>  
    <fixture id="subscriptionCreate"> 
        <autocreate value="false"/>  
        <autodelete value="false"/>  
        <resource> 
            <reference value="./_reference/resources/rest-hook-subscriptionCreate.json"/> 
        </resource> 
    </fixture>  
    <variable> 
        <name value="redirectURL"/>  
        <description value="url the empty POST will be sent to in order to notify of a change in the subscription criteria; should be the Touchstone proxy url for the actual endpoint so the empty POST goes through Touchstone"/>  
        <hint value="url the empty POST will be sent to in order to notify of a change in the subscription criteria; should be the Touchstone proxy url for the actual endpoint so the empty POST goes through Touchstone"/> 
    </variable>  
    <variable> 
        <name value="TS_Header"/>  
        <description value="the header Touchstone requires to match a request to a test execution (i.e. USER_KEY: ZRFwMBrm0Iy2t7c6n3y)"/>  
        <hint value="the header Touchstone requires to match a request to a test execution (i.e. USER_KEY: ZRFwMBrm0Iy2t7c6n3y)"/> 
    </variable>  
    <variable> 
        <name value="authorizationresponseid"/>  
        <description value="claimResponse.identifier"/>  
        <hint value="claimResponse.identifier"/> 
    </variable>  
    <variable> 
        <name value="PatientIdentifier"/>  
        <description value="claimResponse.patient.identifier"/>  
        <hint value="claimResponse.patient.identifier"/> 
    </variable>  
    <setup> 
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="delete"/> 
                </type>  
                <resource value="Subscription"/>  
                <description value="Delete testing artifacts"/>  
                <accept value="json"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="false"/>  
                <params value="?uri=${redirectURL}"/> 
            </operation> 
        </action> 
    </setup>  
    <test id="RestHookSetup"> 
        <name value="RestHookSetup"/>  
        <description value="Create the Subscription resource on the Subscription Server."/>  
        <action> 
            <operation> 
                <type> 
                    <system value="http://hl7.org/fhir/testscript-operation-codes"/>  
                    <code value="create"/> 
                </type>  
                <resource value="Subscription"/>  
                <description value="Create the Subscription resource on the Subscription Server."/>  
                <contentType value="json"/>  
                <destination value="1"/>  
                <encodeRequestUrl value="false"/>  
                <origin value="1"/>  
                <sourceId value="subscriptionCreate"/> 
            </operation> 
        </action>  
        <action> 
            <assert> 
                <direction value="response"/>  
                <responseCode value="201"/>  
                <warningOnly value="false"/> 
            </assert> 
        </action> 
    </test> 
</TestScript>