Name | /FHIRSandbox/DaVinci/FHIR4-0-1-Member-Attr/MemberAttr-2-0-0/04-Resource-Create/ATR-Create-Group |
Description | DaVinci Attribution - Create Group. This sends a create Group request. The test validates the request. |
Version | 2 | Latest | 2 |
<?xml version="1.0" encoding="UTF-8"?>
<TestScript xmlns="http://hl7.org/fhir">
<id value="ATR-Create-Group-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>ATR-Create-Group-json</p>
</div>
</text>
<url value="http://wildfhir.aegis.net/fhir4-0-1/TestScript/ATR-Create-Group-json"/>
<name value="ATR-Create-Group-json"/>
<status value="active"/>
<date value="2024-01-15"/>
<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="DaVinci Attribution - Create Group. This sends a create Group request. The test validates the request."/>
<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="resource-create">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference value="./_reference/ATR-Create-Group.json"/>
</resource>
</fixture>
<profile id="ATRGroupProfile">
<reference value="http://hl7.org/fhir/us/davinci-atr/StructureDefinition/atr-group"/>
</profile>
<variable>
<name value="GroupLocation"/>
<description value="Group Location from the Create request's Location header."/>
<headerField value="Location"/>
<sourceId value="createGroupResponse"/>
</variable>
<test id="01-ATR-Create-Group-json">
<name value="01-ATR-Create-Group-json"/>
<description value="Creating the Group resource"/>
<action>
<operation>
<type>
<system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="create"/>
</type>
<resource value="Group"/>
<description value="Create the Group resource"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<responseId value="createGroupResponse"/>
<sourceId value="resource-create"/>
</operation>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Accept format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Accept"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="request"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the request body contains a Group"/>
<direction value="request"/>
<resource value="Group"/>
<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 the request Group against the ATR profile for Group."/>
<direction value="request"/>
<validateProfileId value="ATRGroupProfile"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the returned HTTP status is 200,201. Note, support of Create is optional, so warnings only if fails."/>
<direction value="response"/>
<operator value="in"/>
<responseCode value="200,201"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response HTTP Header Content-Type format is the FHIR mime-type 'application/fhir+json'."/>
<direction value="response"/>
<headerField value="Content-Type"/>
<operator value="contains"/>
<value value="application/fhir+json"/>
<warningOnly value="true"/>
</assert>
</action>
<action>
<assert>
<description value="Confirm that the response Header contains the location of the Group. Note, support of Create is optional, so warnings only if fails."/>
<direction value="response"/>
<headerField value="Location"/>
<operator value="notEmpty"/>
<warningOnly value="true"/>
</assert>
</action>
</test>
</TestScript>