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 Core Diagnostic Result Observation

AU Core Diagnostic Result Observation — search & obligation-pair conformance

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.

Name
AUCoreDiagnosticResult
URL
http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult
Status
active

Fixtures

  • patient-fixture: au-core-patient-conformant (created before, and removed after, the run)
  • diagnosticresult-fixture: au-core-diagnosticresult-conformant (created before, and removed after, the run)
  • diagnosticresult-absent-fixture: au-core-diagnosticresult-absent (created before, and removed after, the run)

Variables

  • ${patientId} = Patient.id of patient-fixture
  • ${diagnosticResultId} = Observation.id of diagnosticresult-fixture
  • ${diagnosticResultAbsentId} = Observation.id of diagnosticresult-absent-fixture

Read

  1. Read Observation by id (${diagnosticResultId}) READ Observation/${diagnosticResultId}
  2. Response status is okay response = okay

SearchByPatientCode

  1. Search Observation where patient = Patient/${patientId} and code = http://loinc.org|89024-4 SEARCH Observation?patient=Patient/${patientId}&code=http://loinc.org|89024-4
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '89024-4').exists() expression = Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '89024-4').exists()

SearchByPatientCategory

  1. Search Observation where patient = Patient/${patientId} and category = http://terminology.hl7.org/CodeSystem/v2-0074|AU SEARCH Observation?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/v2-0074|AU
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'AU').exists() expression = Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'AU').exists()

SearchByPatientCategoryDate

  1. Search Observation where patient = Patient/${patientId} and category = http://terminology.hl7.org/CodeSystem/v2-0074|AU and date = 2026-01-15 SEARCH Observation?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/v2-0074|AU&date=2026-01-15
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '89024-4').exists() expression = Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '89024-4').exists()

MustSupport

  1. Read Observation by id (${diagnosticResultId}) READ Observation/${diagnosticResultId}
  2. Check: Observation.status.exists() expression = Observation.status.exists()
  3. Check: Observation.category.exists() expression = Observation.category.exists()
  4. Check: Observation.code.exists() expression = Observation.code.exists()
  5. Check: Observation.subject.exists() expression = Observation.subject.exists()
  6. Check: Observation.effective.exists() expression = Observation.effective.exists()
  7. Check: Observation.performer.exists() expression = Observation.performer.exists()
  8. Check: Observation.value.exists() expression = Observation.value.exists()
  9. Check: Observation.bodySite.exists() expression = Observation.bodySite.exists()
  10. Check: Observation.component.exists() expression = Observation.component.exists()
  11. Check: Observation.component.code.exists() expression = Observation.component.code.exists()
  12. Check: Observation.component.value.exists() expression = Observation.component.value.exists()

MustSupportObligationPair

  1. Read Observation by id (${diagnosticResultAbsentId}) READ Observation/${diagnosticResultAbsentId}
  2. Check: Observation.dataAbsentReason.exists() expression = Observation.dataAbsentReason.exists()
  3. Check: Observation.component.dataAbsentReason.exists() expression = Observation.component.dataAbsentReason.exists()
  4. Check: Observation.hasMember.exists() expression = Observation.hasMember.exists()

ObligationNoError

  1. Search Observation where patient = Patient/${patientId} and code = http://loinc.org|89026-9 SEARCH Observation?patient=Patient/${patientId}&code=http://loinc.org|89026-9
  2. Response HTTP status code is 200 responseCode = 200
  3. Check: Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists() expression = Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()

ProfileValidation

  1. Read Observation by id (${diagnosticResultId}) READ Observation/${diagnosticResultId}
  2. Validate the response against profile http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult validateProfileId = http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult

ProfileValidationObligationPair

  1. Read Observation by id (${diagnosticResultAbsentId}) READ Observation/${diagnosticResultAbsentId}
  2. Validate the response against profile http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult validateProfileId = http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult