au-core-diagnosticresult-path
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-diagnosticresult-path
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript au-core-diagnosticresult-path url: TestScript AU Core Pathology Result Observation — search & obligation-pair conformance version: 0.1.0 name: AUCoreDiagnosticResultPath title: AU Core Pathology Result Observation — search & obligation-pair conformance status: Active date: 2026-08-16 05:55:37+0000 publisher: FHIR Frog contact: FHIR Frog: https://gitlab.com/fhirfrog description: 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…
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult-path
test script.version:
  value: 0.1.0
test script.name:
  value: AUCoreDiagnosticResultPath
test script.title:
  value: AU Core Pathology Result Observation — search & obligation-pair 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 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.
test script.fixture:
  index: 0
  element.id:
    value: patient-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-patient-conformant
test script.fixture:
  index: 1
  element.id:
    value: diagnosticresultpath-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-diagnosticresult-path-conformant
test script.fixture:
  index: 2
  element.id:
    value: diagnosticresultpath-absent-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-diagnosticresult-path-absent
test script.variable:
  index: 0
  test script.variable.name:
    value: patientId
  test script.variable.path:
    value: Patient.id
  test script.variable.source id:
    value: patient-fixture
test script.variable:
  index: 1
  test script.variable.name:
    value: pathResultId
  test script.variable.path:
    value: Observation.id
  test script.variable.source id:
    value: diagnosticresultpath-fixture
test script.variable:
  index: 2
  test script.variable.name:
    value: pathResultAbsentId
  test script.variable.path:
    value: Observation.id
  test script.variable.source id:
    value: diagnosticresultpath-absent-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: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${pathResultId}
  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: SearchByPatientCode
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&code=http://loinc.org|2951-2
  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.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: SearchByPatientCategory
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory
  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.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'laboratory').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 3
  test script.test.name:
    value: SearchByPatientCategoryDate
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=2026-01-20
  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.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 4
  test script.test.name:
    value: MustSupport
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true

value: read

value: search

value: search

value: search

value: read

value: /${pathResultId}

index: 1
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.status.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 2
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.category.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 3
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.category.coding.code.where($this = 'laboratory').exists()
  test script.setup.action.assert.warning only:
    value: false

index: 4
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.category.coding.system.where($this = 'http://terminology.hl7.org/CodeSystem/v2-0074').exists()
  test script.setup.action.assert.warning only:
    value: false

index: 5
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.code.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 6
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.subject.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 7
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.effective.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 8
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.performer.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 9
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.value.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 10
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.interpretation.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 11
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.specimen.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 12
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.referenceRange.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 13
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.referenceRange.low.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 14
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.referenceRange.high.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 15
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.referenceRange.type.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 16
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.referenceRange.text.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 17
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.component.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 18
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.component.code.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 19
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.component.value.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 5
test script.test.name:
  value: MustSupportObligationPair
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: read
    test script.setup.action.operation.resource:
      value: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${pathResultAbsentId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Observation.dataAbsentReason.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: Observation.component.dataAbsentReason.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: Observation.hasMember.exists()
    test script.setup.action.assert.warning only:
      value: false

index: 6
test script.test.name:
  value: ObligationNoError
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: search
    test script.setup.action.operation.resource:
      value: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: ?patient=Patient/${patientId}&code=http://loinc.org|718-7
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.response code:
      value: 200
    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: Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()
    test script.setup.action.assert.warning only:
      value: false

index: 7
test script.test.name:
  value: ProfileValidation
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: read
    test script.setup.action.operation.resource:
      value: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${pathResultId}
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-diagnosticresult-path
    test script.setup.action.assert.warning only:
      value: false

index: 8
test script.test.name:
  value: ProfileValidationObligationPair
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: read
    test script.setup.action.operation.resource:
      value: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${pathResultAbsentId}
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-diagnosticresult-path
    test script.setup.action.assert.warning only:
      value: false