Scalable Consent Management Testing Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Page standards status: Trial-use | Maturity Level: 1 |
{
"resourceType" : "TestScript",
"id" : "fastconsentsearchconsentjson",
"meta" : {
"profile" : [
🔗 "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"
]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: TestScript fastconsentsearchconsentjson</b></p><a name=\"fastconsentsearchconsentjson\"> </a><a name=\"hcfastconsentsearchconsentjson\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"file://D:\\GitHub\\Touchstone\\testing-ig\\output/StructureDefinition-testscript.html\">AEGIS Touchstone Testing TestScript Profile</a></p></div><p><b>StructureDefinition Work Group</b>: cbcc</p><p><b>url</b>: <a href=\"TestScript-fastconsentsearchconsentjson.html\">TestScript FAST Consent Search Consent JSON</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: FASTConsentSearchConsentJSON</p><p><b>title</b>: FAST Consent Search Consent JSON</p><p><b>status</b>: Active</p><p><b>date</b>: 2025-05-22</p><p><b>publisher</b>: HL7 International / Community Based Collaborative Care</p><p><b>contact</b>: HL7 International / Community Based Collaborative Care: <a href=\"http://www.hl7.org/Special/committees/cbcc\">http://www.hl7.org/Special/committees/cbcc</a></p><p><b>description</b>: </p><div><p>Test a FAST Consent Management Server implementation of the FHIR search interaction for Consent resources using JSON Format. The user must enter the FAST Consent patientId parameter. The reverse include parameter for any recorded AuditEvent resources is also defined.</p>\n</div><p><b>jurisdiction</b>: <span title=\"Codes:{urn:iso:std:iso:3166 US}\">United States of America</span></p><p><b>copyright</b>: </p><div><p>(c) HL7 International / Community Based Collaborative Care 2025</p>\n</div><h3>Origins</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-testscript-profile-origin-types.html#testscript-profile-origin-types-FHIR-Client\">Test script profile origin type FHIR-Client</a>: FHIR Client</td></tr></table><h3>Destinations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style=\"display: none\">*</td><td>1</td><td><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-testscript-profile-destination-types.html#testscript-profile-destination-types-FHIR-Server\">Test script profile destination type FHIR-Server</a>: FHIR Server</td></tr></table><p><b>profile</b>: <a href=\"http://hl7.org/fhir/R4/bundle.html\">http://hl7.org/fhir/StructureDefinition/Bundle</a></p><h3>Variables</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Name</b></td><td><b>DefaultValue</b></td><td><b>Description</b></td><td><b>Hint</b></td></tr><tr><td style=\"display: none\">*</td><td>patientId</td><td>example</td><td>Enter a known Consent patientI Identifier value on the destination system.</td><td>[patientId Identifier]</td></tr></table><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>FASTConsentSearchConsentJSON</blockquote><p><b>name</b>: FASTConsentSearchConsentJSON</p><p><b>description</b>: Test the FAST Consent Management Server search operation with reverse include of any recorded AuditEvent resources. The expected response content is a searchset Bundle resource for all Consent resources matching the patientId parameter in JSON format.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search\">Test script operation code search</a>: Search</td><td>Consent</td><td>Search for the Consent and validate the search results</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?patientId=${patientId}&_revinclude=AuditEvent:consent</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned response code is 200 OK.</td><td>response</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>HeaderField</b></td><td><b>Operator</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned HTTP Header Content-Type is present.</td><td>response</td><td>Content-Type</td><td>notEmpty</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ContentType</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'. Warning only to allow for review.</td><td>response</td><td>json</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned response payload is a Bundle resource.</td><td>response</td><td>Bundle</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned Bundle conforms to the FAST Consent IG and FHIR specification.</td><td>response</td><td>BundleProfile</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned response payload is a searchset Bundle resource.</td><td>response</td><td>.type</td><td>searchset</td><td>true</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned searchset Bundle contains a Consent resource.</td><td>response</td><td>Bundle.entry.resource.as(Consent).exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Confirm that the returned searchset Bundle contains an AuditEvent resource.</td><td>response</td><td>Bundle.entry.resource.as(AuditEvent).exists()</td><td>false</td></tr></table></blockquote></blockquote></div>"
},
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode" : "cbcc"
}
],
"url" : "http://hl7.org/fhir/us/consent-management-tg/TestScript/fastconsentsearchconsentjson",
"version" : "0.1.0",
"name" : "FASTConsentSearchConsentJSON",
"title" : "FAST Consent Search Consent JSON",
"status" : "active",
"date" : "2025-05-22",
"publisher" : "HL7 International / Community Based Collaborative Care",
"contact" : [
{
"name" : "HL7 International / Community Based Collaborative Care",
"telecom" : [
{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/cbcc"
}
]
}
],
"description" : "Test a FAST Consent Management Server implementation of the FHIR search interaction for Consent resources using JSON Format. The user must enter the FAST Consent patientId parameter. The reverse include parameter for any recorded AuditEvent resources is also defined.",
"jurisdiction" : [
{
"coding" : [
{
"system" : "urn:iso:std:iso:3166",
"code" : "US",
"display" : "United States of America"
}
]
}
],
"copyright" : "(c) HL7 International / Community Based Collaborative Care 2025",
"origin" : [
{
"index" : 1,
"profile" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types",
"code" : "FHIR-Client"
}
}
],
"destination" : [
{
"index" : 1,
"profile" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types",
"code" : "FHIR-Server"
}
}
],
"profile" : [
{
🔗 "id" : "BundleProfile",
"reference" : "http://hl7.org/fhir/StructureDefinition/Bundle"
}
],
"variable" : [
{
"name" : "patientId",
"defaultValue" : "example",
"description" : "Enter a known Consent patientI Identifier value on the destination system.",
"hint" : "[patientId Identifier]"
}
],
"test" : [
{
"id" : "FASTConsentSearchConsentJSON",
"name" : "FASTConsentSearchConsentJSON",
"description" : "Test the FAST Consent Management Server search operation with reverse include of any recorded AuditEvent resources. The expected response content is a searchset Bundle resource for all Consent resources matching the patientId parameter in JSON format.",
"action" : [
{
"operation" : {
"type" : {
"system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code" : "search"
},
"resource" : "Consent",
"description" : "Search for the Consent and validate the search results",
"accept" : "json",
"contentType" : "json",
"destination" : 1,
"encodeRequestUrl" : true,
"origin" : 1,
"params" : "?patientId=${patientId}&_revinclude=AuditEvent:consent"
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned response code is 200 OK.",
"direction" : "response",
"responseCode" : "200",
"warningOnly" : false
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned HTTP Header Content-Type is present.",
"direction" : "response",
"headerField" : "Content-Type",
"operator" : "notEmpty",
"warningOnly" : false
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned HTTP Header Content-Type contains the FHIR mime-type 'application/fhir+json'. Warning only to allow for review.",
"direction" : "response",
"contentType" : "json",
"warningOnly" : true
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned response payload is a Bundle resource.",
"direction" : "response",
"resource" : "Bundle",
"warningOnly" : true
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned Bundle conforms to the FAST Consent IG and FHIR specification.",
"direction" : "response",
"validateProfileId" : "BundleProfile",
"warningOnly" : true
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned response payload is a searchset Bundle resource.",
"direction" : "response",
"path" : ".type",
"value" : "searchset",
"warningOnly" : true
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned searchset Bundle contains a Consent resource.",
"direction" : "response",
"expression" : "Bundle.entry.resource.as(Consent).exists()",
"warningOnly" : false
}
},
{
"assert" : {
"extension" : [
{
"url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
"valueBoolean" : false
}
],
"description" : "Confirm that the returned searchset Bundle contains an AuditEvent resource.",
"direction" : "response",
"expression" : "Bundle.entry.resource.as(AuditEvent).exists()",
"warningOnly" : false
}
}
]
}
]
}