AEGIS Touchstone Testing Implementation Guide

This is the Version 1.3.0 Release of the Touchstone Testing Implementation Guide, based on FHIR Version 4.0.1. See the Directory of published versions

JSON Format: TestScript-ndjson-assertion-prefix

Raw json


{
  "resourceType" : "TestScript",
  "id" : "ndjson-assertion-prefix",
  "meta" : {
    "profile" : [
      "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"
    ]
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>url</b>: <code>http://touchstone.aegis.net/touchstone/fhir/testing/TestScript/ndjson-assertion-prefix</code></p><p><b>version</b>: 1.3.0</p><p><b>name</b>: NDJSONAssertionPrefixSyntax</p><p><b>title</b>: Demonstrate NDJSON Assertion Prefix Syntax</p><p><b>status</b>: active</p><p><b>date</b>: 2020-12-06</p><p><b>publisher</b>: AEGIS.net, Inc.</p><p><b>contact</b>: Touchstone Support: <a href=\"mailto:Touchstone_Support@aegis.net\">Touchstone_Support@aegis.net</a></p><p><b>description</b>: Demonstrate NDJSON Assertion Prefix Syntax</p><p><b>jurisdiction</b>: <span title=\"Codes: {urn:iso:std:iso:3166 US}\">United States of America</span></p><p><b>copyright</b>: (c) AEGIS.net, Inc. 2015+</p><blockquote><p><b>destination</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>index</b>: 1</p><p><b>profile</b>: <span title=\"{http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types FHIR-Server}\">FHIR Server</span></p></blockquote><p><b>profile</b>: </p><ul><li><a href=\"http://hl7.org/fhir/StructureDefinition/Patient\">Generated Summary: url: http://hl7.org/fhir/StructureDefinition/Patient; version: 4.0.1; name: Patient; ACTIVE; date: Oct 31, 2019 6:29:23 PM; publisher: Health Level Seven International (Patient Administration); http://hl7.org/fhir, http://www.hl7.org/Special/com...; description: Demographics and other administrative information about an individual or animal receiving care or other health-related services.; purpose: Tracking patient is the center of the healthcare process.; 4.0.1; RESOURCE; type: Patient; baseDefinition: http://hl7.org/fhir/StructureDefinition/DomainResource; SPECIALIZATION</a></li><li><a href=\"{any}http://hl7.org/fhir/StructureDefinition/Patient\">{any}http://hl7.org/fhir/StructureDefinition/Patient</a></li><li><a href=\"{1}http://hl7.org/fhir/StructureDefinition/Patient\">{1}http://hl7.org/fhir/StructureDefinition/Patient</a></li><li><a href=\"{.name[?(@.family=='Gracia')]}http://hl7.org/fhir/StructureDefinition/Patient\">{.name[?(@.family=='Gracia')]}http://hl7.org/fhir/StructureDefinition/Patient</a></li></ul><h3>Variables</h3><table class=\"grid\"><tr><td>-</td><td><b>Name</b></td><td><b>DefaultValue</b></td></tr><tr><td>*</td><td>outputBaseUrl</td><td>http://localhost:33000/bulk-api/output</td></tr></table><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertContentTypeResourceAndValidation</p><p><b>description</b>: Demonstrates contentType, resource and validateProfile assertions with no filters.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Request BulkData</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/1/Patient.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'.</td><td>request</td><td>Accept</td><td>contains</td><td>ndjson</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Direction</b></td><td><b>ContentType</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>response</td><td>ndjson</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Direction</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>response</td><td>Patient</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>Validate that the returned resource conforms to the corresponding FHIR resource profile.</td><td>response</td><td>resource-profile</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertResourceType</p><p><b>description</b>: Demonstrates resource assertions.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Retrieve invalid NDJSON that contains mix of Patient and Person resource types.</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/2/patient-person-mix.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>&lt;resource value=\"Patient\"/&gt;</td><td>response</td><td>Patient</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertResourceCount</p><p><b>description</b>: Demonstrates resource-count assertions (only works with NDJSON responses).</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Retrieve NDJSON response that contains 5 Patient resources.</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/1/Patient.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td>&lt;path value=\"resource-count\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"5\"/&gt;</td><td>response</td><td>equals</td><td>resource-count</td><td>5</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"resource-count\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"6\"/&gt;</td><td>response</td><td>equals</td><td>resource-count</td><td>6</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"resource-count\"/&gt;  &lt;operator value=\"greaterThan\"/&gt;  &lt;value value=\"4\"/&gt;</td><td>response</td><td>greaterThan</td><td>resource-count</td><td>4</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner}resource-count\"/&gt;  &lt;operator value=\"greaterThan\"/&gt;  &lt;value value=\"4\"/&gt;</td><td>response</td><td>greaterThan</td><td>{generalPractitioner}resource-count</td><td>4</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count\"/&gt;  &lt;operator value=\"greaterThan\"/&gt;  &lt;value value=\"4\"/&gt;</td><td>response</td><td>greaterThan</td><td>{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count</td><td>4</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"1\"/&gt;</td><td>response</td><td>equals</td><td>{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertPath</p><p><b>description</b>: Demonstrates path assertions.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Retrieve NDJSON response that contains 5 Patient resources.</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/1/Patient.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"generalPractitioner.reference\"/&gt;  &lt;operator value=\"contains\"/&gt;  &lt;value value=\"Practitioner/\"/&gt;</td><td>response</td><td>contains</td><td>generalPractitioner.reference</td><td>Practitioner/</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"generalPractitioner.reference\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Practitioner/2\"/&gt;</td><td>response</td><td>equals</td><td>generalPractitioner.reference</td><td>Practitioner/2</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{any}generalPractitioner.reference\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Practitioner/2\"/&gt;</td><td>response</td><td>equals</td><td>{any}generalPractitioner.reference</td><td>Practitioner/2</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{2}generalPractitioner.reference\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Practitioner/2\"/&gt;</td><td>response</td><td>equals</td><td>{2}generalPractitioner.reference</td><td>Practitioner/2</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{3}generalPractitioner.reference\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Practitioner/2\"/&gt;</td><td>response</td><td>equals</td><td>{3}generalPractitioner.reference</td><td>Practitioner/2</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{2-5}generalPractitioner.reference\"/&gt;  &lt;operator value=\"contains\"/&gt;  &lt;value value=\"Practitioner/\"/&gt;</td><td>response</td><td>contains</td><td>{2-5}generalPractitioner.reference</td><td>Practitioner/</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{2-100}generalPractitioner.reference\"/&gt;  &lt;operator value=\"contains\"/&gt;  &lt;value value=\"Practitioner/\"/&gt;</td><td>response</td><td>contains</td><td>{2-100}generalPractitioner.reference</td><td>Practitioner/</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{6-100}generalPractitioner.reference\"/&gt;  &lt;operator value=\"contains\"/&gt;  &lt;value value=\"Practitioner/\"/&gt;</td><td>response</td><td>contains</td><td>{6-100}generalPractitioner.reference</td><td>Practitioner/</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Allen\"/&gt;</td><td>response</td><td>equals</td><td>{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family</td><td>Allen</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Gracia\"/&gt;</td><td>response</td><td>equals</td><td>{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family</td><td>Gracia</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner}name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Gracia,McKay,Allen,Williams,Hill\"/&gt;</td><td>response</td><td>in</td><td>{generalPractitioner}name.family</td><td>Gracia,McKay,Allen,Williams,Hill</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner}name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"a,b,c,d,e\"/&gt;</td><td>response</td><td>in</td><td>{generalPractitioner}name.family</td><td>a,b,c,d,e</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{generalPractitioner}name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"a,b,Allen,d,e\"/&gt;</td><td>response</td><td>in</td><td>{generalPractitioner}name.family</td><td>a,b,Allen,d,e</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{any|generalPractitioner}name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"a,b,Allen,d,e\"/&gt;</td><td>response</td><td>in</td><td>{any|generalPractitioner}name.family</td><td>a,b,Allen,d,e</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>Path</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;path value=\"{any|generalPractiXXXXXXXXXXXXXioner}name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"a,b,Allen,d,e\"/&gt;</td><td>response</td><td>in</td><td>{any|generalPractiXXXXXXXXXXXXXioner}name.family</td><td>a,b,Allen,d,e</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertFhirPath</p><p><b>description</b>: Demonstrates expression assertions.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Retrieve NDJSON response that contains 5 Patient resources.</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/1/Patient.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"Patient.name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Allen,Gracia\"/&gt;</td><td>response</td><td>Patient.name.family</td><td>in</td><td>Allen,Gracia</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{any}Patient.name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Allen,Gracia\"/&gt;</td><td>response</td><td>{any}Patient.name.family</td><td>in</td><td>Allen,Gracia</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{all}Patient.name.family\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"Allen\"/&gt;</td><td>response</td><td>{all}Patient.name.family</td><td>equals</td><td>Allen</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{1-3}Patient.name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"McKay,Gracia,Allen\"/&gt;</td><td>response</td><td>{1-3}Patient.name.family</td><td>in</td><td>McKay,Gracia,Allen</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{1-100}Patient.name.family\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"McKay,Gracia,Allen\"/&gt;</td><td>response</td><td>{1-100}Patient.name.family</td><td>in</td><td>McKay,Gracia,Allen</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"Patient.name.given\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Joshua,P\"/&gt;</td><td>response</td><td>Patient.name.given</td><td>in</td><td>Joshua,P</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{any}Patient.name.given\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"George\"/&gt;</td><td>response</td><td>{any}Patient.name.given</td><td>equals</td><td>George</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{1-3}Patient.name.given\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Brian,Q,George,Carol,G\"/&gt;</td><td>response</td><td>{1-3}Patient.name.given</td><td>in</td><td>Brian,Q,George,Carol,G</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{1-100}Patient.name.given\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Brian,Q,George,Carol,G\"/&gt;</td><td>response</td><td>{1-100}Patient.name.given</td><td>in</td><td>Brian,Q,George,Carol,G</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{1-100}Patient.name.given\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Brian,Q,George,Carol,G,Joshua,H,P\"/&gt;</td><td>response</td><td>{1-100}Patient.name.given</td><td>in</td><td>Brian,Q,George,Carol,G,Joshua,H,P</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{.name[?(@.family=='Allen')]}Patient.name.given\"/&gt;  &lt;operator value=\"in\"/&gt;  &lt;value value=\"Carol,G\"/&gt;</td><td>response</td><td>{.name[?(@.family=='Allen')]}Patient.name.given</td><td>in</td><td>Carol,G</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>&lt;expression value=\"{.name[?(@.family=='McKay')]}Patient.name.given\"/&gt;  &lt;operator value=\"equals\"/&gt;  &lt;value value=\"George\"/&gt;</td><td>response</td><td>{.name[?(@.family=='McKay')]}Patient.name.given</td><td>equals</td><td>George</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>&lt;expression value=\"Patient.name.where(family='Gracia')\"/&gt;</td><td>response</td><td>Patient.name.where(family='Gracia')</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>&lt;expression value=\"{any}Patient.name.where(family='Gracia')\"/&gt;</td><td>response</td><td>{any}Patient.name.where(family='Gracia')</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><h3>Ids</h3><table class=\"grid\"><tr><td>-</td></tr><tr><td>*</td></tr></table><p><b>name</b>: AssertProfileValidation</p><p><b>description</b>: Demonstrates validateProfileId assertions.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class=\"grid\"><tr><td>-</td><td><b>Type</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Url</b></td></tr><tr><td>*</td><td><span title=\"{http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes get}\">GET</span></td><td>Retrieve NDJSON response that contains 5 Patient resources. Some of the resources are invalid (will fail AEGIS Validator validation)</td><td>ndjson</td><td>1</td><td>true</td><td>${outputBaseUrl}/3/patient-some-invalid.ndjson</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</td><td><b>Extension</b></td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td>*</td><td></td><td>Confirm that the returned HTTP status is 200.</td><td>response</td><td>equals</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>Validate that the returned resource conforms to the corresponding FHIR resource profile.</td><td>response</td><td>resource-profile</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>Validate that the returned resource conforms to the corresponding FHIR resource profile.</td><td>response</td><td>resource-profile-for-any</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>Validate that the returned resource conforms to the corresponding FHIR resource profile.</td><td>response</td><td>resource-profile-for-first</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td>-</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>*</td><td></td><td>Validate that the returned resource conforms to the corresponding FHIR resource profile.</td><td>response</td><td>resource-profile-for-Gracia</td><td>false</td></tr></table></blockquote></blockquote></div>"
  },
  "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/TestScript/ndjson-assertion-prefix",
  "version" : "1.3.0",
  "name" : "NDJSONAssertionPrefixSyntax",
  "title" : "Demonstrate NDJSON Assertion Prefix Syntax",
  "status" : "active",
  "date" : "2020-12-06",
  "publisher" : "AEGIS.net, Inc.",
  "contact" : [
    {
      "name" : "Touchstone Support",
      "telecom" : [
        {
          "system" : "email",
          "value" : "Touchstone_Support@aegis.net",
          "use" : "work"
        }
      ]
    }
  ],
  "description" : "Demonstrate NDJSON Assertion Prefix Syntax",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "US",
          "display" : "United States of America"
        }
      ]
    }
  ],
  "copyright" : "(c) AEGIS.net, Inc. 2015+",
  "destination" : [
    {
      "id" : "Server",
      "index" : 1,
      "profile" : {
        "system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types",
        "code" : "FHIR-Server"
      }
    }
  ],
  "profile" : [
    {
      "id" : "resource-profile",
      "reference" : "http://hl7.org/fhir/StructureDefinition/Patient"
    },
    {
      "id" : "resource-profile-for-any",
      "reference" : "{any}http://hl7.org/fhir/StructureDefinition/Patient"
    },
    {
      "id" : "resource-profile-for-first",
      "reference" : "{1}http://hl7.org/fhir/StructureDefinition/Patient"
    },
    {
      "id" : "resource-profile-for-Gracia",
      "reference" : "{.name[?(@.family=='Gracia')]}http://hl7.org/fhir/StructureDefinition/Patient"
    }
  ],
  "variable" : [
    {
      "name" : "outputBaseUrl",
      "defaultValue" : "http://localhost:33000/bulk-api/output"
    }
  ],
  "test" : [
    {
      "id" : "AssertContentTypeResourceAndValidation",
      "name" : "AssertContentTypeResourceAndValidation",
      "description" : "Demonstrates contentType, resource and validateProfile assertions with no filters.",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Request BulkData",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/1/Patient.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the client requested an Accept of the FHIR JSON mime type 'application/fhir+json'.",
            "direction" : "request",
            "headerField" : "Accept",
            "operator" : "contains",
            "value" : "ndjson",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "direction" : "response",
            "contentType" : "ndjson",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "direction" : "response",
            "resource" : "Patient",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Validate that the returned resource conforms to the corresponding FHIR resource profile.",
            "direction" : "response",
            "validateProfileId" : "resource-profile",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "AssertResourceType",
      "name" : "AssertResourceType",
      "description" : "Demonstrates resource assertions.",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Retrieve invalid NDJSON that contains mix of Patient and Person resource types.",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/2/patient-person-mix.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<resource value=\"Patient\"/>",
            "direction" : "response",
            "resource" : "Patient",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "AssertResourceCount",
      "name" : "AssertResourceCount",
      "description" : "Demonstrates resource-count assertions (only works with NDJSON responses).",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Retrieve NDJSON response that contains 5 Patient resources.",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/1/Patient.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "description" : "<path value=\"resource-count\"/>  <operator value=\"equals\"/>  <value value=\"5\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "resource-count",
            "value" : "5",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"resource-count\"/>  <operator value=\"equals\"/>  <value value=\"6\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "resource-count",
            "value" : "6",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"resource-count\"/>  <operator value=\"greaterThan\"/>  <value value=\"4\"/>",
            "direction" : "response",
            "operator" : "greaterThan",
            "path" : "resource-count",
            "value" : "4",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner}resource-count\"/>  <operator value=\"greaterThan\"/>  <value value=\"4\"/>",
            "direction" : "response",
            "operator" : "greaterThan",
            "path" : "{generalPractitioner}resource-count",
            "value" : "4",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count\"/>  <operator value=\"greaterThan\"/>  <value value=\"4\"/>",
            "direction" : "response",
            "operator" : "greaterThan",
            "path" : "{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count",
            "value" : "4",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count\"/>  <operator value=\"equals\"/>  <value value=\"1\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{generalPractitioner[?(@.reference=='Practitioner/4')]}resource-count",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "AssertPath",
      "name" : "AssertPath",
      "description" : "Demonstrates path assertions.",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Retrieve NDJSON response that contains 5 Patient resources.",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/1/Patient.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"generalPractitioner.reference\"/>  <operator value=\"contains\"/>  <value value=\"Practitioner/\"/>",
            "direction" : "response",
            "operator" : "contains",
            "path" : "generalPractitioner.reference",
            "value" : "Practitioner/",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"generalPractitioner.reference\"/>  <operator value=\"equals\"/>  <value value=\"Practitioner/2\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "generalPractitioner.reference",
            "value" : "Practitioner/2",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{any}generalPractitioner.reference\"/>  <operator value=\"equals\"/>  <value value=\"Practitioner/2\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{any}generalPractitioner.reference",
            "value" : "Practitioner/2",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{2}generalPractitioner.reference\"/>  <operator value=\"equals\"/>  <value value=\"Practitioner/2\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{2}generalPractitioner.reference",
            "value" : "Practitioner/2",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{3}generalPractitioner.reference\"/>  <operator value=\"equals\"/>  <value value=\"Practitioner/2\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{3}generalPractitioner.reference",
            "value" : "Practitioner/2",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{2-5}generalPractitioner.reference\"/>  <operator value=\"contains\"/>  <value value=\"Practitioner/\"/>",
            "direction" : "response",
            "operator" : "contains",
            "path" : "{2-5}generalPractitioner.reference",
            "value" : "Practitioner/",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{2-100}generalPractitioner.reference\"/>  <operator value=\"contains\"/>  <value value=\"Practitioner/\"/>",
            "direction" : "response",
            "operator" : "contains",
            "path" : "{2-100}generalPractitioner.reference",
            "value" : "Practitioner/",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{6-100}generalPractitioner.reference\"/>  <operator value=\"contains\"/>  <value value=\"Practitioner/\"/>",
            "direction" : "response",
            "operator" : "contains",
            "path" : "{6-100}generalPractitioner.reference",
            "value" : "Practitioner/",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family\"/>  <operator value=\"equals\"/>  <value value=\"Allen\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family",
            "value" : "Allen",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family\"/>  <operator value=\"equals\"/>  <value value=\"Gracia\"/>",
            "direction" : "response",
            "operator" : "equals",
            "path" : "{generalPractitioner[?(@.reference=='Practitioner/3')]}name.family",
            "value" : "Gracia",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner}name.family\"/>  <operator value=\"in\"/>  <value value=\"Gracia,McKay,Allen,Williams,Hill\"/>",
            "direction" : "response",
            "operator" : "in",
            "path" : "{generalPractitioner}name.family",
            "value" : "Gracia,McKay,Allen,Williams,Hill",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner}name.family\"/>  <operator value=\"in\"/>  <value value=\"a,b,c,d,e\"/>",
            "direction" : "response",
            "operator" : "in",
            "path" : "{generalPractitioner}name.family",
            "value" : "a,b,c,d,e",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{generalPractitioner}name.family\"/>  <operator value=\"in\"/>  <value value=\"a,b,Allen,d,e\"/>",
            "direction" : "response",
            "operator" : "in",
            "path" : "{generalPractitioner}name.family",
            "value" : "a,b,Allen,d,e",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{any|generalPractitioner}name.family\"/>  <operator value=\"in\"/>  <value value=\"a,b,Allen,d,e\"/>",
            "direction" : "response",
            "operator" : "in",
            "path" : "{any|generalPractitioner}name.family",
            "value" : "a,b,Allen,d,e",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<path value=\"{any|generalPractiXXXXXXXXXXXXXioner}name.family\"/>  <operator value=\"in\"/>  <value value=\"a,b,Allen,d,e\"/>",
            "direction" : "response",
            "operator" : "in",
            "path" : "{any|generalPractiXXXXXXXXXXXXXioner}name.family",
            "value" : "a,b,Allen,d,e",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "AssertFhirPath",
      "name" : "AssertFhirPath",
      "description" : "Demonstrates expression assertions.",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Retrieve NDJSON response that contains 5 Patient resources.",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/1/Patient.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"Patient.name.family\"/>  <operator value=\"in\"/>  <value value=\"Allen,Gracia\"/>",
            "direction" : "response",
            "expression" : "Patient.name.family",
            "operator" : "in",
            "value" : "Allen,Gracia",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{any}Patient.name.family\"/>  <operator value=\"in\"/>  <value value=\"Allen,Gracia\"/>",
            "direction" : "response",
            "expression" : "{any}Patient.name.family",
            "operator" : "in",
            "value" : "Allen,Gracia",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{all}Patient.name.family\"/>  <operator value=\"equals\"/>  <value value=\"Allen\"/>",
            "direction" : "response",
            "expression" : "{all}Patient.name.family",
            "operator" : "equals",
            "value" : "Allen",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{1-3}Patient.name.family\"/>  <operator value=\"in\"/>  <value value=\"McKay,Gracia,Allen\"/>",
            "direction" : "response",
            "expression" : "{1-3}Patient.name.family",
            "operator" : "in",
            "value" : "McKay,Gracia,Allen",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{1-100}Patient.name.family\"/>  <operator value=\"in\"/>  <value value=\"McKay,Gracia,Allen\"/>",
            "direction" : "response",
            "expression" : "{1-100}Patient.name.family",
            "operator" : "in",
            "value" : "McKay,Gracia,Allen",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"Patient.name.given\"/>  <operator value=\"in\"/>  <value value=\"Joshua,P\"/>",
            "direction" : "response",
            "expression" : "Patient.name.given",
            "operator" : "in",
            "value" : "Joshua,P",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{any}Patient.name.given\"/>  <operator value=\"equals\"/>  <value value=\"George\"/>",
            "direction" : "response",
            "expression" : "{any}Patient.name.given",
            "operator" : "equals",
            "value" : "George",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{1-3}Patient.name.given\"/>  <operator value=\"in\"/>  <value value=\"Brian,Q,George,Carol,G\"/>",
            "direction" : "response",
            "expression" : "{1-3}Patient.name.given",
            "operator" : "in",
            "value" : "Brian,Q,George,Carol,G",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{1-100}Patient.name.given\"/>  <operator value=\"in\"/>  <value value=\"Brian,Q,George,Carol,G\"/>",
            "direction" : "response",
            "expression" : "{1-100}Patient.name.given",
            "operator" : "in",
            "value" : "Brian,Q,George,Carol,G",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{1-100}Patient.name.given\"/>  <operator value=\"in\"/>  <value value=\"Brian,Q,George,Carol,G,Joshua,H,P\"/>",
            "direction" : "response",
            "expression" : "{1-100}Patient.name.given",
            "operator" : "in",
            "value" : "Brian,Q,George,Carol,G,Joshua,H,P",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{.name[?(@.family=='Allen')]}Patient.name.given\"/>  <operator value=\"in\"/>  <value value=\"Carol,G\"/>",
            "direction" : "response",
            "expression" : "{.name[?(@.family=='Allen')]}Patient.name.given",
            "operator" : "in",
            "value" : "Carol,G",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{.name[?(@.family=='McKay')]}Patient.name.given\"/>  <operator value=\"equals\"/>  <value value=\"George\"/>",
            "direction" : "response",
            "expression" : "{.name[?(@.family=='McKay')]}Patient.name.given",
            "operator" : "equals",
            "value" : "George",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"Patient.name.where(family='Gracia')\"/>",
            "direction" : "response",
            "expression" : "Patient.name.where(family='Gracia')",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "<expression value=\"{any}Patient.name.where(family='Gracia')\"/>",
            "direction" : "response",
            "expression" : "{any}Patient.name.where(family='Gracia')",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "AssertProfileValidation",
      "name" : "AssertProfileValidation",
      "description" : "Demonstrates validateProfileId assertions.",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes",
              "code" : "get"
            },
            "description" : "Retrieve NDJSON response that contains 5 Patient resources. Some of the resources are invalid (will fail AEGIS Validator validation)",
            "accept" : "ndjson",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "url" : "${outputBaseUrl}/3/patient-some-invalid.ndjson"
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Confirm that the returned HTTP status is 200.",
            "direction" : "response",
            "operator" : "equals",
            "responseCode" : "200",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Validate that the returned resource conforms to the corresponding FHIR resource profile.",
            "direction" : "response",
            "validateProfileId" : "resource-profile",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Validate that the returned resource conforms to the corresponding FHIR resource profile.",
            "direction" : "response",
            "validateProfileId" : "resource-profile-for-any",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Validate that the returned resource conforms to the corresponding FHIR resource profile.",
            "direction" : "response",
            "validateProfileId" : "resource-profile-for-first",
            "warningOnly" : false
          }
        },
        {
          "assert" : {
            "extension" : [
              {
                "url" : "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail",
                "valueBoolean" : false
              }
            ],
            "description" : "Validate that the returned resource conforms to the corresponding FHIR resource profile.",
            "direction" : "response",
            "validateProfileId" : "resource-profile-for-Gracia",
            "warningOnly" : false
          }
        }
      ]
    }
  ]
}