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
| Official URL: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-medicationstatement | Version: 0.1.0 | |||
| Active as of 2026-08-16 | Computable Name: AUCoreMedicationStatement | |||
Covers the SHALL-level AU Core MedicationStatement (2.0.0) requirements: read, search by patient (SHALL), plus the single-parameter _id/effective/status searches called for by fhirfrog/au-core-compiler#15, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's MedicationStatementGroup (medication_statement_read_test, medication_statement_patient_search_test, medication_statement__id_search_test, medication_statement_effective_search_test, medication_statement_status_search_test, medication_statement_must_support_test, medication_statement_validation_test) — the patient+status/patient+effective combinatorial searches and the identifier chain searches (dva/ihi/medicare) are not replicated here, matching the SHALL-only scope rationale from #6. Uses medicationCodeableConcept only (simpler than MedicationRequest's medication[x] case); the medicationReference must-support slice is therefore not exercised by this single-fixture set. Per #15, Inferno itself does not wire an inclusion-validation (_include) test for MedicationStatement, so no _include coverage is authored here either.
url: TestScript AU Core MedicationStatement — SHALL-level conformance
version: 0.1.0
name: AUCoreMedicationStatement
title: AU Core MedicationStatement — SHALL-level conformance
status: Active
date: 2026-08-16 05:55:37+0000
publisher: FHIR Frog
contact: FHIR Frog: https://gitlab.com/fhirfrog
description:
Covers the SHALL-level AU Core MedicationStatement (2.0.0) requirements: read, search by patient (SHALL), plus the single-parameter _id/effective/status searches called for by fhirfrog/au-core-compiler#15, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's MedicationStatementGroup (medication_statement_read_test, medication_statement_patient_search_test, medication_statement__id_search_test, medication_statement_effective_search_test, medication_statement_status_search_test, medication_statement_must_support_test, medication_statement_validation_test) — the patient+status/patient+effective combinatorial searches and the identifier chain searches (dva/ihi/medicare) are not replicated here, matching the SHALL-only scope rationale from #6. Uses medicationCodeableConcept only (simpler than MedicationRequest's medication[x] case); the medicationReference must-support slice is therefore not exercised by this single-fixture set. Per #15, Inferno itself does not wire an inclusion-validation (_include) test for MedicationStatement, so no _include coverage is authored here either.
fixture
id
patient-fixtureautocreate: true
autodelete: true
resource:
au-core-patient-conformant
fixture
id
medicationstatement-reason-fixtureautocreate: true
autodelete: true
resource:
au-core-medicationstatement-reason-condition
fixture
id
medicationstatement-fixtureautocreate: true
autodelete: true
resource:
au-core-medicationstatement-conformant
variable
name: patientId
path: Patient.id
sourceId: patient-fixture
variable
name: medicationStatementId
path: MedicationStatement.id
sourceId: medicationstatement-fixture
test
name: Read
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: read (Read) MedicationStatement true /${medicationStatementId} action
Asserts
Response WarningOnly okay false
test
name: SearchByPatient
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: search (Search) MedicationStatement true ?patient=${patientId} action
Asserts
Response WarningOnly okay false action
Asserts
Expression WarningOnly Bundle.entry.resource.ofType(MedicationStatement).medication.ofType(CodeableConcept).text.where($this.contains('Bactrim')).exists() false
test
name: SearchById
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: search (Search) MedicationStatement true ?_id=${medicationStatementId} action
Asserts
Response WarningOnly okay false action
Asserts
Expression WarningOnly Bundle.entry.resource.ofType(MedicationStatement).status = 'active' false
test
name: SearchByEffective
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: search (Search) MedicationStatement true ?effective=2024-06-01 action
Asserts
Response WarningOnly okay false action
Asserts
Expression WarningOnly Bundle.entry.resource.ofType(MedicationStatement).effective = '2024-06-01' false
test
name: SearchByStatus
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: search (Search) MedicationStatement true ?status=active action
Asserts
Response WarningOnly okay false action
Asserts
Expression WarningOnly Bundle.entry.resource.ofType(MedicationStatement).status = 'active' false
test
name: MustSupport
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: read (Read) MedicationStatement true /${medicationStatementId} action
Asserts
Expression WarningOnly MedicationStatement.status.exists() false action
Asserts
Expression WarningOnly MedicationStatement.medication.exists() false action
Asserts
Expression WarningOnly MedicationStatement.medication.ofType(CodeableConcept).exists() false action
Asserts
Expression WarningOnly MedicationStatement.subject.exists() false action
Asserts
Expression WarningOnly MedicationStatement.effective.exists() false action
Asserts
Expression WarningOnly MedicationStatement.dateAsserted.exists() false action
Asserts
Expression WarningOnly MedicationStatement.dosage.exists() false action
Asserts
Expression WarningOnly MedicationStatement.dosage.text.exists() false action
Asserts
Expression WarningOnly MedicationStatement.reasonCode.exists() false action
Asserts
Expression WarningOnly MedicationStatement.reasonReference.exists() false
test
name: ProfileValidation
action
Operations
Type Resource EncodeRequestUrl Params Test script operation code: read (Read) MedicationStatement true /${medicationStatementId} action
Asserts
ValidateProfileId WarningOnly http://hl7.org.au/fhir/core/StructureDefinition/au-core-medicationstatement false