au-core-medication
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-medication
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript au-core-medication url: TestScript AU Core Medication — SHALL-level conformance version: 0.1.0 name: AUCoreMedication title: AU Core Medication — 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 Medication (2.0.0) requirements reachable via direct read: read by id, must-support element presence (code; code.coding pbs and amt slices), and profile conformance validation. AU Core Medication defines no AU-Core search parameters, so this TestScript is read-only by design — there is no per-search-param test block, unlike au-core-patient. Inferno's own coverage of au-core-medication is itself indirect: config.basic.json sets Medication: {skip_generation: true}, so no standalone Inferno group exists for this profile, and it is otherwise reached only via MedicationRequest's medication_request_medication_inclusion_validation_test.rb, which validates a Medication resource fetched through _include=MedicationRequest:medication. That inclusion pattern is covered separately by au-core-medicationrequest's TestScript (fhirfrog/au-core-compiler#14) and is not duplicated here. This TestScript instead exercises Medication directly by id, mirroring the SHALL-only scope precedent set for Patient (fhirfrog/au-core-compiler#6). See fhirfrog/au-core-compiler#13 for scope rationale. fixture id medication-fixture autocreate: true autodelete: true resource: au-core-medication-conformant Variables - Name Path SourceId * medicationId Medication.id medication-fixture test name: Read action Operations - Type Resource EncodeRequestUrl Params * Test script operation code: read (Read) Medication true /${medicationId} action Asserts - Response WarningOnly * okay false test name: MustSupport action Operations - Type Resource EncodeRequestUrl Params * Test script operation code: read (Read) Medication true /${medicationId} action Asserts - …
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-medication
test script.version:
  value: 0.1.0
test script.name:
  value: AUCoreMedication
test script.title:
  value: AU Core Medication — SHALL-level conformance
test script.status:
  value: active
test script.date:
  value: 2026-08-16T05:55:37+00:00
test script.publisher:
  value: FHIR Frog
test script.contact:
  index: 0
  contact detail.name:
    value: FHIR Frog
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: https://gitlab.com/fhirfrog
test script.description:
  value: Covers the SHALL-level AU Core Medication (2.0.0) requirements reachable via direct read: read by id, must-support element presence (code; code.coding pbs and amt slices), and profile conformance validation. AU Core Medication defines no AU-Core search parameters, so this TestScript is read-only by design — there is no per-search-param test block, unlike au-core-patient. Inferno's own coverage of au-core-medication is itself indirect: config.basic.json sets Medication: {skip_generation: true}, so no standalone Inferno group exists for this profile, and it is otherwise reached only via MedicationRequest's medication_request_medication_inclusion_validation_test.rb, which validates a Medication resource fetched through _include=MedicationRequest:medication. That inclusion pattern is covered separately by au-core-medicationrequest's TestScript (fhirfrog/au-core-compiler#14) and is not duplicated here. This TestScript instead exercises Medication directly by id, mirroring the SHALL-only scope precedent set for Patient (fhirfrog/au-core-compiler#6). See fhirfrog/au-core-compiler#13 for scope rationale.
test script.fixture:
  index: 0
  element.id:
    value: medication-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-medication-conformant
test script.variable:
  index: 0
  test script.variable.name:
    value: medicationId
  test script.variable.path:
    value: Medication.id
  test script.variable.source id:
    value: medication-fixture
test script.test:
  index: 0
  test script.test.name:
    value: Read
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Medication
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${medicationId}
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 1
  test script.test.name:
    value: MustSupport
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Medication
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${medicationId}
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Medication.code.exists()
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Medication.code.coding.where(system = 'http://pbs.gov.au/code/item').exists()
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 3
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Medication.code.coding.where(system = 'http://snomed.info/sct').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: ProfileValidation
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Medication
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${medicationId}
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.validate profile id:
        value: http://hl7.org.au/fhir/core/StructureDefinition/au-core-medication
      test script.setup.action.assert.warning only:
        value: false

value: read

value: read

value: read