FHIR Frog AU Core Conformance Tests
0.1.0 - draft

FHIR Frog AU Core Conformance Tests, published by FHIR Frog. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jgsuess/au-core-tests/ and changes regularly. See the Directory of published versions

: AU Imaging Result Observation — optionality discovery template - TTL Representation

Active as of 2026-08-16

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 -------------------------------------------------------------------

<http://hl7.org/fhir/TestScript/au-imagingresult> a fhir:TestScript ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "au-imagingresult"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: TestScript au-imagingresult</b></p><a name=\"au-imagingresult\"> </a><a name=\"hcau-imagingresult\"> </a><p><b>url</b>: <a href=\"TestScript-au-imagingresult.html\">TestScript AU Imaging Result Observation — optionality discovery template</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: AUImagingResult</p><p><b>title</b>: AU Imaging Result Observation — optionality discovery template</p><p><b>status</b>: Active</p><p><b>date</b>: 2026-08-16 05:55:37+0000</p><p><b>publisher</b>: FHIR Frog</p><p><b>contact</b>: FHIR Frog: <a href=\"https://gitlab.com/fhirfrog\">https://gitlab.com/fhirfrog</a></p><p><b>description</b>: </p><div><p>Covers fhirfrog/au-core-compiler#23 (AUC-018): au-imagingresult (hl7.fhir.au.base, not a local au-core-* profile) has zero must-support elements of its own, and neither au-fhir-core-inferno (deliberately or not - couldn't confirm skip_generation for it specifically, see the issue's comment thread) nor fhir-frog test it today. Rather than a conventional must-support conformance gate (there's nothing profile-mandated to gate on), this is deliberately built as a discovery template: SHALL-level read/search-type interaction checks (the one real, resource-level requirement the CapabilityStatement does impose) run with warningOnly:false, while every element this profile merely <em>allows</em> (category:anatomicRegionOfInterest, extension:bodyStructure vs plain bodySite, value[x]/dataAbsentReason, component, hasMember) is probed with warningOnly:true against two fixtures - 'au-imagingresult-conformant' (a generous implementer) and 'au-imagingresult-minimal' (a bare-bones one). Building these two fixtures surfaced that 'zero must-support elements' does not mean unconstrained: au-imagingresult carries its own hard invariants not visible from the must-support list alone - inv-obs-0 (value, dataAbsentReason, or a child observation with either must be present - the minimal fixture needed a plain dataAbsentReason to satisfy this, it cannot be genuinely empty), inv-obs-1 (the bodyStructure Reference extension and the plain bodySite CodeableConcept are mutually exclusive, inherited from base Observation's own obs-7 rule about a component sharing its parent's code while both carry a value). Run against a real server, OptionalElementsProbeMinimal's warnings (not failures) are the point: they show which of the genuinely-optional elements that server does or doesn't populate. This only works because assert.warningOnly, though already required and set on every assertion since fhirfrog/fhir-frog's 'add required encodeRequestUrl/warningOnly fields' fix, was never actually read by PhaseExecutor - a failing warningOnly assertion still failed the whole test, identical to a hard one. Fixed alongside this TestScript (see fhirfrog/fhir-frog's PhaseExecutor commit): a failing warningOnly assertion now reports as TestReport's own WARNING result code instead of FAIL, and no longer fails the enclosing test/setup phase - proven by OptionalElementsProbeMinimal genuinely failing several of its own probe assertions against the minimal fixture while the TestScript as a whole still reports PASS.</p>\n</div><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>patient-fixture</blockquote><p><b>autocreate</b>: true</p><p><b>autodelete</b>: true</p><p><b>resource</b>: <code>au-core-patient-conformant</code></p></blockquote><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>imagingresult-fixture</blockquote><p><b>autocreate</b>: true</p><p><b>autodelete</b>: true</p><p><b>resource</b>: <code>au-imagingresult-conformant</code></p></blockquote><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>imagingresult-minimal-fixture</blockquote><p><b>autocreate</b>: true</p><p><b>autodelete</b>: true</p><p><b>resource</b>: <code>au-imagingresult-minimal</code></p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: patientId</p><p><b>path</b>: Patient.id</p><p><b>sourceId</b>: patient-fixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: imagingResultId</p><p><b>path</b>: Observation.id</p><p><b>sourceId</b>: imagingresult-fixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: imagingResultMinimalId</p><p><b>path</b>: Observation.id</p><p><b>sourceId</b>: imagingresult-minimal-fixture</p></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: Read</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code: read</a> (Read)</td><td>Observation</td><td>true</td><td>/${imagingResultId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>okay</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: SearchByPatientCategory</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search\">Test script operation code: search</a> (Search)</td><td>Observation</td><td>true</td><td>?patient=Patient/${patientId}&amp;category=http://terminology.hl7.org/CodeSystem/observation-category|imaging</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>okay</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'imaging').exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: SearchByPatientCode</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search\">Test script operation code: search</a> (Search)</td><td>Observation</td><td>true</td><td>?patient=Patient/${patientId}&amp;code=http://snomed.info/sct|399208008</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>okay</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '399208008').exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: OptionalElementsProbeGenerous</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code: read</a> (Read)</td><td>Observation</td><td>true</td><td>/${imagingResultId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.category.coding.code.where($this = 'imaging').exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.category.where(coding.system = 'http://snomed.info/sct').exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/bodySite').exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.value.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.dataAbsentReason.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.bodySite.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.component.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.hasMember.exists()</td><td>true</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: OptionalElementsProbeMinimal</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code: read</a> (Read)</td><td>Observation</td><td>true</td><td>/${imagingResultMinimalId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.category.where(coding.system = 'http://snomed.info/sct').exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/bodySite').exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.value.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.dataAbsentReason.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.bodySite.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.component.exists()</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>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Observation.hasMember.exists()</td><td>true</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: ProfileValidation</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code: read</a> (Read)</td><td>Observation</td><td>true</td><td>/${imagingResultId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>http://hl7.org.au/fhir/StructureDefinition/au-imagingresult</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: ProfileValidationMinimal</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>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-read\">Test script operation code: read</a> (Read)</td><td>Observation</td><td>true</td><td>/${imagingResultMinimalId}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>http://hl7.org.au/fhir/StructureDefinition/au-imagingresult</td><td>false</td></tr></table></blockquote></blockquote></div>"
  ] ;
  fhir:TestScript.url [ fhir:value "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-imagingresult"] ;
  fhir:TestScript.version [ fhir:value "0.1.0"] ;
  fhir:TestScript.name [ fhir:value "AUImagingResult"] ;
  fhir:TestScript.title [ fhir:value "AU Imaging Result Observation — optionality discovery template"] ;
  fhir:TestScript.status [ fhir:value "active"] ;
  fhir:TestScript.date [ fhir:value "2026-08-16T05:55:37+00:00"^^xsd:dateTime] ;
  fhir:TestScript.publisher [ fhir:value "FHIR Frog"] ;
  fhir:TestScript.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "FHIR Frog" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://gitlab.com/fhirfrog" ]
     ]
  ] ;
  fhir:TestScript.description [ fhir:value "Covers fhirfrog/au-core-compiler#23 (AUC-018): au-imagingresult (hl7.fhir.au.base, not a local au-core-* profile) has zero must-support elements of its own, and neither au-fhir-core-inferno (deliberately or not - couldn't confirm skip_generation for it specifically, see the issue's comment thread) nor fhir-frog test it today. Rather than a conventional must-support conformance gate (there's nothing profile-mandated to gate on), this is deliberately built as a discovery template: SHALL-level read/search-type interaction checks (the one real, resource-level requirement the CapabilityStatement does impose) run with warningOnly:false, while every element this profile merely *allows* (category:anatomicRegionOfInterest, extension:bodyStructure vs plain bodySite, value[x]/dataAbsentReason, component, hasMember) is probed with warningOnly:true against two fixtures - 'au-imagingresult-conformant' (a generous implementer) and 'au-imagingresult-minimal' (a bare-bones one). Building these two fixtures surfaced that 'zero must-support elements' does not mean unconstrained: au-imagingresult carries its own hard invariants not visible from the must-support list alone - inv-obs-0 (value, dataAbsentReason, or a child observation with either must be present - the minimal fixture needed a plain dataAbsentReason to satisfy this, it cannot be genuinely empty), inv-obs-1 (the bodyStructure Reference extension and the plain bodySite CodeableConcept are mutually exclusive, inherited from base Observation's own obs-7 rule about a component sharing its parent's code while both carry a value). Run against a real server, OptionalElementsProbeMinimal's warnings (not failures) are the point: they show which of the genuinely-optional elements that server does or doesn't populate. This only works because assert.warningOnly, though already required and set on every assertion since fhirfrog/fhir-frog's 'add required encodeRequestUrl/warningOnly fields' fix, was never actually read by PhaseExecutor - a failing warningOnly assertion still failed the whole test, identical to a hard one. Fixed alongside this TestScript (see fhirfrog/fhir-frog's PhaseExecutor commit): a failing warningOnly assertion now reports as TestReport's own WARNING result code instead of FAIL, and no longer fails the enclosing test/setup phase - proven by OptionalElementsProbeMinimal genuinely failing several of its own probe assertions against the minimal fixture while the TestScript as a whole still reports PASS."] ;
  fhir:TestScript.fixture [
     fhir:index 0 ;
     fhir:Element.id [ fhir:value "patient-fixture" ] ;
     fhir:TestScript.fixture.autocreate [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.autodelete [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.resource [
       fhir:Reference.reference [ fhir:value "au-core-patient-conformant" ]
     ]
  ], [
     fhir:index 1 ;
     fhir:Element.id [ fhir:value "imagingresult-fixture" ] ;
     fhir:TestScript.fixture.autocreate [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.autodelete [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.resource [
       fhir:Reference.reference [ fhir:value "au-imagingresult-conformant" ]
     ]
  ], [
     fhir:index 2 ;
     fhir:Element.id [ fhir:value "imagingresult-minimal-fixture" ] ;
     fhir:TestScript.fixture.autocreate [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.autodelete [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.resource [
       fhir:Reference.reference [ fhir:value "au-imagingresult-minimal" ]
     ]
  ] ;
  fhir:TestScript.variable [
     fhir:index 0 ;
     fhir:TestScript.variable.name [ fhir:value "patientId" ] ;
     fhir:TestScript.variable.path [ fhir:value "Patient.id" ] ;
     fhir:TestScript.variable.sourceId [ fhir:value "patient-fixture" ]
  ], [
     fhir:index 1 ;
     fhir:TestScript.variable.name [ fhir:value "imagingResultId" ] ;
     fhir:TestScript.variable.path [ fhir:value "Observation.id" ] ;
     fhir:TestScript.variable.sourceId [ fhir:value "imagingresult-fixture" ]
  ], [
     fhir:index 2 ;
     fhir:TestScript.variable.name [ fhir:value "imagingResultMinimalId" ] ;
     fhir:TestScript.variable.path [ fhir:value "Observation.id" ] ;
     fhir:TestScript.variable.sourceId [ fhir:value "imagingresult-minimal-fixture" ]
  ] ;
  fhir:TestScript.test [
     fhir:index 0 ;
     fhir:TestScript.test.name [ fhir:value "Read" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${imagingResultId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 1 ;
     fhir:TestScript.test.name [ fhir:value "SearchByPatientCategory" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "search" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|imaging" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'imaging').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:TestScript.test.name [ fhir:value "SearchByPatientCode" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "search" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "?patient=Patient/${patientId}&code=http://snomed.info/sct|399208008" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '399208008').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 3 ;
     fhir:TestScript.test.name [ fhir:value "OptionalElementsProbeGenerous" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${imagingResultId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.category.coding.code.where($this = 'imaging').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.category.where(coding.system = 'http://snomed.info/sct').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 3 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/bodySite').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 4 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.value.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 5 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.dataAbsentReason.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 6 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.bodySite.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 7 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.component.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 8 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.hasMember.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 4 ;
     fhir:TestScript.test.name [ fhir:value "OptionalElementsProbeMinimal" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${imagingResultMinimalId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.category.where(coding.system = 'http://snomed.info/sct').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/bodySite').exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 3 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.value.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 4 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.dataAbsentReason.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 5 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.bodySite.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 6 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.component.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ], [
       fhir:index 7 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Observation.hasMember.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "true"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 5 ;
     fhir:TestScript.test.name [ fhir:value "ProfileValidation" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${imagingResultId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.validateProfileId [ fhir:value "http://hl7.org.au/fhir/StructureDefinition/au-imagingresult" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 6 ;
     fhir:TestScript.test.name [ fhir:value "ProfileValidationMinimal" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "Observation" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${imagingResultMinimalId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.validateProfileId [ fhir:value "http://hl7.org.au/fhir/StructureDefinition/au-imagingresult" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/TestScript/au-imagingresult.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/TestScript/au-imagingresult.ttl> .