US Core Testing Guide
3.1.1-1 - ci-build United States of America flag

US Core Testing Guide - Local Development build (v3.1.1-1). See the Directory of published versions

: Tests for CapabilityStatement using the FHIR CapabilityStatement Resource XML - TTL Representation

Active as of 2023-08-25

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:TestScript ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "USCoreCapabilityStatementxml"] ; #
  fhir:meta [
    ( fhir:profile [
fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"^^xsd:anyURI ;
fhir:link <http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript>     ] )
  ] ; #
  fhir:text [
fhir:status [ fhir:v "extensions" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: TestScript</b><a name=\"USCoreCapabilityStatementxml\"> </a></p><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\">Resource TestScript &quot;USCoreCapabilityStatementxml&quot; </p><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><blockquote><p><b>AEGIS Touchstone Testing TestScript Rule Extension</b></p><blockquote><p><b>url</b></p><code>ruleId</code></blockquote><p><b>value</b>: rule-verifyTLS</p><blockquote><p><b>url</b></p><code>path</code></blockquote><p><b>value</b>: ./VerifyTLS.groovy</p></blockquote><p><b>url</b>: <code>http://hl7.org/fhir/us/core-tg/TestScript/USCoreCapabilityStatementxml</code></p><p><b>version</b>: 3.1.1-1</p><p><b>name</b>: USCoreCapabilityStatementxml</p><p><b>title</b>: Tests for CapabilityStatement using the FHIR CapabilityStatement Resource XML</p><p><b>status</b>: active</p><p><b>date</b>: 2023-08-25</p><p><b>publisher</b>: HL7 FHIR Infrastructure WG</p><p><b>contact</b>: HL7 FHIR Infrastructure WG: <a href=\"https://hl7.org/Special/committees/fiwg\">https://hl7.org/Special/committees/fiwg</a>, Richard Ettema: <a href=\"mailto:mailto:richard.ettema@aegis.net\">mailto:richard.ettema@aegis.net</a></p><p><b>description</b>: Tests for CapabilityStatement using the FHIR CapabilityStatement Resource using XML format.</p><p><b>jurisdiction</b>: United States of America <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-ISO3166Part1.html\">ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code</a>#US)</span></p><p><b>copyright</b>: (c) Health Level 7 (HL7) International 2023</p><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>FHIR Client (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types code FHIR-Client = 'FHIR Client', stated as 'null')</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>FHIR Server (Details: http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types code FHIR-Server = 'FHIR Server', stated as 'null')</td></tr></table><p><b>profile</b>: <a href=\"http://hl7.org/fhir/StructureDefinition/CapabilityStatement\">http://hl7.org/fhir/StructureDefinition/CapabilityStatement</a> &quot;CapabilityStatement&quot;</p><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>01-FHIRServerConformance</blockquote><p><b>name</b>: 01-FHIRServerConformance</p><p><b>description</b>: FHIR Server Supports the Conformance Interactions</p><blockquote><p><b>action</b></p><blockquote><p><b>operation</b></p><p><b>type</b>: Capabilities (Details: http://terminology.hl7.org/CodeSystem/testscript-operation-codes code capabilities = 'Capabilities', stated as 'null')</p><p><b>description</b>: GET on Metadata</p><p><b>accept</b>: xml</p><p><b>contentType</b>: xml</p><p><b>destination</b>: 1</p><p><b>encodeRequestUrl</b>: true</p><p><b>origin</b>: 1</p><p><b>params</b>: /metadata</p><blockquote><p><b>requestHeader</b></p></blockquote></blockquote></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>Operator</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 or 201 Created.</td><td>response</td><td>in</td><td>200,201</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>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 CapabilityStatement resource.</td><td>response</td><td>CapabilityStatement</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>Operator</b></td><td><b>RequestURL</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Verify the base Url uses https</td><td>response</td><td>contains</td><td>https</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>, </td><td>OAuth 2.0 authorize endpoint secured by transport layer security. Apps MUST assure that sensitive information (authentication secrets, authorization codes, tokens) is transmitted ONLY to authenticated servers, over TLS-secured channels.</td><td>response</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>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Expect fhirVersion is 4.0.1</td><td>response</td><td>CapabilityStatement.fhirVersion</td><td>4.0.1</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>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td/><td>Validate for json support against the Capability profile</td><td>response</td><td>CapabilityStatement.format</td><td>json,application/json,application/fhir+json</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>Verify that at lease one non-patient US Core profile is supported</td><td>response</td><td>CapabilityStatement.rest.resource.where(supportedProfile.startsWith('http://hl7.org/fhir/us/core/StructureDefinition/') and supportedProfile!='http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient').count()&gt;0</td><td>false</td></tr></table></blockquote></blockquote></div>"
  ] ; #
  fhir:extension ( [
    ( fhir:extension [
fhir:url [ fhir:v "ruleId"^^xsd:anyURI ] ;
fhir:value [ fhir:v "rule-verifyTLS" ]     ] [
fhir:url [ fhir:v "path"^^xsd:anyURI ] ;
fhir:value [ fhir:v "./VerifyTLS.groovy" ]     ] ) ;
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-rule"^^xsd:anyURI ]
  ] ) ; #
  fhir:url [ fhir:v "http://hl7.org/fhir/us/core-tg/TestScript/USCoreCapabilityStatementxml"^^xsd:anyURI] ; #
  fhir:version [ fhir:v "3.1.1-1"] ; #
  fhir:name [ fhir:v "USCoreCapabilityStatementxml"] ; #
  fhir:title [ fhir:v "Tests for CapabilityStatement using the FHIR CapabilityStatement Resource XML"] ; #
  fhir:status [ fhir:v "active"] ; #
  fhir:date [ fhir:v "2023-08-25"^^xsd:date] ; #
  fhir:publisher [ fhir:v "HL7 FHIR Infrastructure WG"] ; #
  fhir:contact ( [
fhir:name [ fhir:v "HL7 FHIR Infrastructure WG" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://hl7.org/Special/committees/fiwg" ]     ] )
  ] [
fhir:name [ fhir:v "Richard Ettema" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "email" ] ;
fhir:value [ fhir:v "mailto:richard.ettema@aegis.net" ]     ] )
  ] ) ; #
  fhir:description [ fhir:v "Tests for CapabilityStatement using the FHIR CapabilityStatement Resource using XML format."] ; #
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "US" ]     ] )
  ] ) ; #
  fhir:copyright [ fhir:v "(c) Health Level 7 (HL7) International 2023"] ; #
  fhir:origin ( [
fhir:index [ fhir:v "1"^^xsd:integer ] ;
fhir:profile [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"^^xsd:anyURI ] ;
fhir:code [ fhir:v "FHIR-Client" ]     ]
  ] ) ; #
  fhir:destination ( [
fhir:index [ fhir:v "1"^^xsd:integer ] ;
fhir:profile [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"^^xsd:anyURI ] ;
fhir:code [ fhir:v "FHIR-Server" ]     ]
  ] ) ; #
  fhir:profile ( [
fhir:link <http://hl7.org/fhir/StructureDefinition/CapabilityStatement> ;
fhir:id [ fhir:v "CapabilityProfile" ] ;
fhir:reference [ fhir:v "http://hl7.org/fhir/StructureDefinition/CapabilityStatement" ]
  ] ) ; #
  fhir:test ( [
fhir:id [ fhir:v "01-FHIRServerConformance" ] ;
fhir:name [ fhir:v "01-FHIRServerConformance" ] ;
fhir:description [ fhir:v "FHIR Server Supports the Conformance Interactions" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "capabilities" ]         ] ;
fhir:description [ fhir:v "GET on Metadata" ] ;
fhir:accept [ fhir:v "xml" ] ;
fhir:contentType [ fhir:v "xml" ] ;
fhir:destination [ fhir:v "1"^^xsd:integer ] ;
fhir:encodeRequestUrl [ fhir:v "true"^^xsd:boolean ] ;
fhir:origin [ fhir:v "1"^^xsd:integer ] ;
fhir:params [ fhir:v "/metadata" ] ;
        ( fhir:requestHeader [
fhir:field [ fhir:v "Authorization" ] ;
fhir:value [ fhir:v "none" ]         ] )       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Confirm that the returned response code is 200 OK or 201 Created." ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:operator [ fhir:v "in" ] ;
fhir:responseCode [ fhir:v "200,201" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Confirm that the returned response payload is a CapabilityStatement resource." ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:resource [ fhir:v "CapabilityStatement" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Verify the base Url uses https" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:operator [ fhir:v "contains" ] ;
fhir:requestURL [ fhir:v "https" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] [
          ( fhir:extension [
fhir:url [ fhir:v "ruleId"^^xsd:anyURI ] ;
fhir:value [ fhir:v "rule-verifyTLS" ]           ] [
            ( fhir:extension [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "endpointName" ]             ] [
fhir:url [ fhir:v "value"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Metadata Endpoint" ]             ] ) ;
fhir:url [ fhir:v "param"^^xsd:anyURI ]           ] [
            ( fhir:extension [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "endpointURL" ]             ] [
fhir:url [ fhir:v "value"^^xsd:anyURI ] ;
fhir:value [ fhir:v "${dest1SystemConfig.baseUrl}/metadata" ]             ] ) ;
fhir:url [ fhir:v "param"^^xsd:anyURI ]           ] ) ;
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-rule"^^xsd:anyURI ]         ] ) ;
fhir:description [ fhir:v "OAuth 2.0 authorize endpoint secured by transport layer security. Apps MUST assure that sensitive information (authentication secrets, authorization codes, tokens) is transmitted ONLY to authenticated servers, over TLS-secured channels." ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Expect fhirVersion is 4.0.1" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "CapabilityStatement.fhirVersion" ] ;
fhir:value [ fhir:v "4.0.1" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Validate for json support against the Capability profile" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "CapabilityStatement.format" ] ;
fhir:value [ fhir:v "json,application/json,application/fhir+json" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] [
fhir:assert [
        ( fhir:extension [
fhir:url [ fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript-assert-stopTestOnFail"^^xsd:anyURI ] ;
fhir:value [ fhir:v "false"^^xsd:boolean ]         ] ) ;
fhir:description [ fhir:v "Verify that at lease one non-patient US Core profile is supported" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "CapabilityStatement.rest.resource.where(supportedProfile.startsWith('http://hl7.org/fhir/us/core/StructureDefinition/') and supportedProfile!='http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient').count()>0" ] ;
fhir:warningOnly [ fhir:v "false"^^xsd:boolean ]       ]     ] )
  ] ) . #

<http://hl7.org/fhir/StructureDefinition/CapabilityStatement> a fhir:StructureDefinition .