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-10-23 |
<TestScript xmlns="http://hl7.org/fhir">
<id value="au-core-diagnosticresult"/>
<url
value="http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult"/>
<version value="0.1.0"/>
<name value="AUCoreDiagnosticResult"/>
<title
value="AU Core Diagnostic Result Observation — search & obligation-pair conformance"/>
<status value="active"/>
<date value="2026-10-23T03:11:59+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 Diagnostic Result Observation (2.0.0) requirements identified in fhirfrog/au-core-compiler#21 (AUC-016): read, search by patient+code/patient+category/patient+category+date (mirroring au-fhir-core-inferno's DiagnosticresultGroup patient_code/patient_category/patient_category_date search tests), must-support element presence across all 14 MS elements (status, category, code, subject, effective[x], performer, value[x], dataAbsentReason, bodySite, hasMember, component, component.code, component.value[x], component.dataAbsentReason), and profile conformance validation. The 14 MS elements are split across two fixtures reflecting how AU Core's paired obligation extensions (SHALL:populate-if-known on the responder, SHALL:no-error on the requester) actually manifest: 'diagnosticresult-fixture' is the ordinary case (value[x] known and populated, plus a component sub-observation), and 'diagnosticresult-absent-fixture' is the case where the underlying result genuinely isn't known - dataAbsentReason/component.dataAbsentReason populated 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. The ObligationNoError test exercises the requester side directly: searching for the absent-value observation must still return a clean 200 (not an error) - this only became testable once fhirfrog/fhir-frog's AssertionEvaluator gained assert.responseCode support and OperationExecutor's executeSearch started catching BaseServerResponseException instead of letting it abort the run (see that engine commit for details). ProfileValidationObligationPair runs validateProfileId against the absent-value fixture specifically, which is what actually machine-checks the au-core-obs-01 invariant now that ProfileValidator's profileUrl handling is fixed (fhirfrog/au-core-compiler#6). Reference-resolution and the remaining SHOULD/MAY search variants (code/status/date multiple-OR, chained patient search, IHI/Medicare/DVA identifier chains) 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="diagnosticresult-fixture">
<autocreate value="true"/>
<autodelete value="true"/>
<resource>
<reference value="au-core-diagnosticresult-conformant"/>
</resource>
</fixture>
<fixture id="diagnosticresult-absent-fixture">
<autocreate value="true"/>
<autodelete value="true"/>
<resource>
<reference value="au-core-diagnosticresult-absent"/>
</resource>
</fixture>
<variable>
<name value="patientId"/>
<path value="Patient.id"/>
<sourceId value="patient-fixture"/>
</variable>
<variable>
<name value="diagnosticResultId"/>
<path value="Observation.id"/>
<sourceId value="diagnosticresult-fixture"/>
</variable>
<variable>
<name value="diagnosticResultAbsentId"/>
<path value="Observation.id"/>
<sourceId value="diagnosticresult-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="/${diagnosticResultId}"/>
</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|89024-4"/>
</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 = '89024-4').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/v2-0074|AU"/>
</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 = 'AU').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/v2-0074|AU&date=2026-01-15"/>
</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 = '89024-4').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="/${diagnosticResultId}"/>
</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.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.bodySite.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="/${diagnosticResultAbsentId}"/>
</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|89016-0"/>
</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="/${diagnosticResultId}"/>
</operation>
</action>
<action>
<assert>
<validateProfileId
value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult"/>
<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="/${diagnosticResultAbsentId}"/>
</operation>
</action>
<action>
<assert>
<validateProfileId
value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>