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
| Active as of 2026-08-16 |
<TestScript xmlns="http://hl7.org/fhir">
<id value="au-core-diagnosticresult-path"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: TestScript au-core-diagnosticresult-path</b></p><a name="au-core-diagnosticresult-path"> </a><a name="hcau-core-diagnosticresult-path"> </a><p><b>url</b>: <a href="TestScript-au-core-diagnosticresult-path.html">TestScript AU Core Pathology Result Observation — search & obligation-pair conformance</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: AUCoreDiagnosticResultPath</p><p><b>title</b>: AU Core Pathology Result Observation — search & obligation-pair conformance</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 the AU Core Pathology Result Observation (au-core-diagnosticresult-path, 2.0.0) requirements identified in fhirfrog/au-core-compiler#22 (AUC-017): read, search by patient+code/patient+category/patient+category+date (mirroring au-fhir-core-inferno's diagnosticresult_path group), must-support presence across all 22 MS elements - including the category:lab (fixed http://terminology.hl7.org/CodeSystem/observation-category|laboratory) and category:specificDiscipline (extensible-bound to the AU THS pathology-diagnostic-service-category ValueSet, e.g. v2-0074|CH for Chemistry) slices - and profile conformance validation. Same obligation-pair split as fhirfrog/au-core-compiler#21's Diagnostic Result Observation TestScript: 'diagnosticresultpath-fixture' is the ordinary case (value[x], interpretation, specimen, referenceRange, and a component all known and populated), and 'diagnosticresultpath-absent-fixture' is the genuinely-not-known case (dataAbsentReason/component.dataAbsentReason instead of value[x]/component.value[x], satisfying the profile's au-core-obs-01 invariant, with hasMember linking back to the ordinary fixture as a panel would). ObligationNoError and ProfileValidationObligationPair exercise the same requester-side SHALL:no-error / au-core-obs-01 machine-checking this profile shares with #21 - see that TestScript's description for why this only became testable once fhirfrog/fhir-frog's AssertionEvaluator gained assert.responseCode support and OperationExecutor's executeSearch started catching BaseServerResponseException. Reference-resolution and the remaining SHOULD/MAY search variants are not replicated - see fhirfrog/au-core-compiler#6 for the general scope rationale.</p>
</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>diagnosticresultpath-fixture</blockquote><p><b>autocreate</b>: true</p><p><b>autodelete</b>: true</p><p><b>resource</b>: <code>au-core-diagnosticresult-path-conformant</code></p></blockquote><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>diagnosticresultpath-absent-fixture</blockquote><p><b>autocreate</b>: true</p><p><b>autodelete</b>: true</p><p><b>resource</b>: <code>au-core-diagnosticresult-path-absent</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>: pathResultId</p><p><b>path</b>: Observation.id</p><p><b>sourceId</b>: diagnosticresultpath-fixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: pathResultAbsentId</p><p><b>path</b>: Observation.id</p><p><b>sourceId</b>: diagnosticresultpath-absent-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>/${pathResultId}</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>: 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}&code=http://loinc.org|2951-2</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 = '2951-2').exists()</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}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory</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 = 'laboratory').exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: SearchByPatientCategoryDate</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}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=2026-01-20</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 = '2951-2').exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: MustSupport</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>/${pathResultId}</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.status.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.category.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.category.coding.code.where($this = 'laboratory').exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.category.coding.system.where($this = 'http://terminology.hl7.org/CodeSystem/v2-0074').exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.code.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.subject.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.effective.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.performer.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.value.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.interpretation.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.specimen.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.referenceRange.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.referenceRange.low.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.referenceRange.high.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.referenceRange.type.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.referenceRange.text.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.component.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.component.code.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.component.value.exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: MustSupportObligationPair</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>/${pathResultAbsentId}</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>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>Observation.component.dataAbsentReason.exists()</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Observation.hasMember.exists()</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: ObligationNoError</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}&code=http://loinc.org|718-7</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>200</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Expression</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()</td><td>false</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>/${pathResultId}</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/core/StructureDefinition/au-core-diagnosticresult-path</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: ProfileValidationObligationPair</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>/${pathResultAbsentId}</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/core/StructureDefinition/au-core-diagnosticresult-path</td><td>false</td></tr></table></blockquote></blockquote></div>
</text>
<url
value="http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult-path"/>
<version value="0.1.0"/>
<name value="AUCoreDiagnosticResultPath"/>
<title
value="AU Core Pathology Result Observation — search & obligation-pair conformance"/>
<status value="active"/>
<date value="2026-08-16T05:55:37+00:00"/>
<publisher value="FHIR Frog"/>
<contact>
<name value="FHIR Frog"/>
<telecom>
<system value="url"/>
<value value="https://gitlab.com/fhirfrog"/>
</telecom>
</contact>
<description
value="Covers the AU Core Pathology Result Observation (au-core-diagnosticresult-path, 2.0.0) requirements identified in fhirfrog/au-core-compiler#22 (AUC-017): read, search by patient+code/patient+category/patient+category+date (mirroring au-fhir-core-inferno's diagnosticresult_path group), must-support presence across all 22 MS elements - including the category:lab (fixed http://terminology.hl7.org/CodeSystem/observation-category|laboratory) and category:specificDiscipline (extensible-bound to the AU THS pathology-diagnostic-service-category ValueSet, e.g. v2-0074|CH for Chemistry) slices - and profile conformance validation. Same obligation-pair split as fhirfrog/au-core-compiler#21's Diagnostic Result Observation TestScript: 'diagnosticresultpath-fixture' is the ordinary case (value[x], interpretation, specimen, referenceRange, and a component all known and populated), and 'diagnosticresultpath-absent-fixture' is the genuinely-not-known case (dataAbsentReason/component.dataAbsentReason instead of value[x]/component.value[x], satisfying the profile's au-core-obs-01 invariant, with hasMember linking back to the ordinary fixture as a panel would). ObligationNoError and ProfileValidationObligationPair exercise the same requester-side SHALL:no-error / au-core-obs-01 machine-checking this profile shares with #21 - see that TestScript's description for why this only became testable once fhirfrog/fhir-frog's AssertionEvaluator gained assert.responseCode support and OperationExecutor's executeSearch started catching BaseServerResponseException. Reference-resolution and the remaining SHOULD/MAY search variants are not replicated - see fhirfrog/au-core-compiler#6 for the general scope rationale."/>
<fixture id="patient-fixture">
<autocreate value="true"/>
<autodelete value="true"/>
<resource>
<reference value="au-core-patient-conformant"/>
</resource>
</fixture>
<fixture id="diagnosticresultpath-fixture">
<autocreate value="true"/>
<autodelete value="true"/>
<resource>
<reference value="au-core-diagnosticresult-path-conformant"/>
</resource>
</fixture>
<fixture id="diagnosticresultpath-absent-fixture">
<autocreate value="true"/>
<autodelete value="true"/>
<resource>
<reference value="au-core-diagnosticresult-path-absent"/>
</resource>
</fixture>
<variable>
<name value="patientId"/>
<path value="Patient.id"/>
<sourceId value="patient-fixture"/>
</variable>
<variable>
<name value="pathResultId"/>
<path value="Observation.id"/>
<sourceId value="diagnosticresultpath-fixture"/>
</variable>
<variable>
<name value="pathResultAbsentId"/>
<path value="Observation.id"/>
<sourceId value="diagnosticresultpath-absent-fixture"/>
</variable>
<test>
<name value="Read"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params value="/${pathResultId}"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="SearchByPatientCode"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params
value="?patient=Patient/${patientId}&code=http://loinc.org|2951-2"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="SearchByPatientCategory"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params
value="?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'laboratory').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="SearchByPatientCategoryDate"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params
value="?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=2026-01-20"/>
</operation>
</action>
<action>
<assert>
<response value="okay"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="MustSupport"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params value="/${pathResultId}"/>
</operation>
</action>
<action>
<assert>
<expression value="Observation.status.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.category.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Observation.category.coding.code.where($this = 'laboratory').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Observation.category.coding.system.where($this = 'http://terminology.hl7.org/CodeSystem/v2-0074').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.code.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.subject.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.effective.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.performer.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.value.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.interpretation.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.specimen.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.referenceRange.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.referenceRange.low.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.referenceRange.high.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.referenceRange.type.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.referenceRange.text.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.component.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.component.code.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.component.value.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="MustSupportObligationPair"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params value="/${pathResultAbsentId}"/>
</operation>
</action>
<action>
<assert>
<expression value="Observation.dataAbsentReason.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.component.dataAbsentReason.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression value="Observation.hasMember.exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="ObligationNoError"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params
value="?patient=Patient/${patientId}&code=http://loinc.org|718-7"/>
</operation>
</action>
<action>
<assert>
<responseCode value="200"/>
<warningOnly value="false"/>
</assert>
</action>
<action>
<assert>
<expression
value="Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="ProfileValidation"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params value="/${pathResultId}"/>
</operation>
</action>
<action>
<assert>
<validateProfileId
value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test>
<name value="ProfileValidationObligationPair"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="read"/>
</type>
<resource value="Observation"/>
<encodeRequestUrl value="true"/>
<params value="/${pathResultAbsentId}"/>
</operation>
</action>
<action>
<assert>
<validateProfileId
value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>