FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagefhirfrog.au-core-tests
Resource TypeTestScript
IdTestScript-au-core-diagnosticresult-path.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/jgsuess/au-core-tests/TestScript-au-core-diagnosticresult-path.html
URLhttp://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult-path
Version0.1.0
Statusactive
Date2026-08-16T05:55:37+00:00
NameAUCoreDiagnosticResultPath
TitleAU Core Pathology Result Observation — search & obligation-pair conformance
DescriptionCovers 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.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

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 remaining SHOULD/MAY search variants are not replicated - see fhirfrog/au-core-compiler#6 for the general scope rationale.

fixture

id

patient-fixture

autocreate: true

autodelete: true

resource: au-core-patient-conformant

fixture

id

diagnosticresultpath-fixture

autocreate: true

autodelete: true

resource: au-core-diagnosticresult-path-conformant

fixture

id

diagnosticresultpath-absent-fixture

autocreate: true

autodelete: true

resource: au-core-diagnosticresult-path-absent

variable

name: patientId

path: Patient.id

sourceId: patient-fixture

variable

name: pathResultId

path: Observation.id

sourceId: diagnosticresultpath-fixture

variable

name: pathResultAbsentId

path: Observation.id

sourceId: diagnosticresultpath-absent-fixture

test

name: Read

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Observationtrue/${pathResultId}

action

Asserts

-ResponseWarningOnly
*okayfalse

test

name: SearchByPatientCode

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Observationtrue?patient=Patient/${patientId}&code=http://loinc.org|2951-2

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()false

test

name: SearchByPatientCategory

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Observationtrue?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'laboratory').exists()false

test

name: SearchByPatientCategoryDate

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Observationtrue?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=2026-01-20

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()false

test

name: MustSupport

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Observationtrue/${pathResultId}

action

Asserts

-ExpressionWarningOnly
*Observation.status.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.category.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.category.coding.code.where($this = 'laboratory').exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.category.coding.system.where($this = 'http://terminology.hl7.org/CodeSystem/v2-0074').exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.code.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.subject.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.effective.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.performer.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.value.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.interpretation.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.specimen.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.referenceRange.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.referenceRange.low.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.referenceRange.high.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.referenceRange.type.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.referenceRange.text.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.component.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.component.code.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.component.value.exists()false

test

name: MustSupportObligationPair

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Observationtrue/${pathResultAbsentId}

action

Asserts

-ExpressionWarningOnly
*Observation.dataAbsentReason.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.component.dataAbsentReason.exists()false

action

Asserts

-ExpressionWarningOnly
*Observation.hasMember.exists()false

test

name: ObligationNoError

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Observationtrue?patient=Patient/${patientId}&code=http://loinc.org|718-7

action

Asserts

-ResponseCodeWarningOnly
*200false

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()false

test

name: ProfileValidation

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Observationtrue/${pathResultId}

action

Asserts

-ValidateProfileIdWarningOnly
*http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-pathfalse

test

name: ProfileValidationObligationPair

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Observationtrue/${pathResultAbsentId}

action

Asserts

-ValidateProfileIdWarningOnly
*http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-pathfalse

Source1

{
  "resourceType": "TestScript",
  "id": "au-core-diagnosticresult-path",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-diagnosticresult-path",
  "version": "0.1.0",
  "name": "AUCoreDiagnosticResultPath",
  "title": "AU Core Pathology Result Observation — search & obligation-pair conformance",
  "status": "active",
  "date": "2026-08-16T05:55:37+00:00",
  "publisher": "FHIR Frog",
  "contact": [
    {
      "name": "FHIR Frog",
      "telecom": [
        {
          "system": "url",
          "value": "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 remaining SHOULD/MAY search variants are not replicated - see fhirfrog/au-core-compiler#6 for the general scope rationale.",
  "fixture": [
    {
      "id": "patient-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-patient-conformant"
      }
    },
    {
      "id": "diagnosticresultpath-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-diagnosticresult-path-conformant"
      }
    },
    {
      "id": "diagnosticresultpath-absent-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-diagnosticresult-path-absent"
      }
    }
  ],
  "variable": [
    {
      "name": "patientId",
      "path": "Patient.id",
      "sourceId": "patient-fixture"
    },
    {
      "name": "pathResultId",
      "path": "Observation.id",
      "sourceId": "diagnosticresultpath-fixture"
    },
    {
      "name": "pathResultAbsentId",
      "path": "Observation.id",
      "sourceId": "diagnosticresultpath-absent-fixture"
    }
  ],
  "test": [
    {
      "name": "Read",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "/${pathResultId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientCode",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "?patient=Patient/${patientId}&code=http://loinc.org|2951-2"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientCategory",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'laboratory').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientCategoryDate",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory&date=2026-01-20"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '2951-2').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupport",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "/${pathResultId}"
          }
        },
        {
          "assert": {
            "expression": "Observation.status.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.category.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.category.coding.code.where($this = 'laboratory').exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.category.coding.system.where($this = 'http://terminology.hl7.org/CodeSystem/v2-0074').exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.code.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.subject.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.effective.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.performer.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.value.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.interpretation.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.specimen.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.referenceRange.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.referenceRange.low.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.referenceRange.high.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.referenceRange.type.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.referenceRange.text.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.component.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.component.code.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.component.value.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupportObligationPair",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "/${pathResultAbsentId}"
          }
        },
        {
          "assert": {
            "expression": "Observation.dataAbsentReason.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.component.dataAbsentReason.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Observation.hasMember.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ObligationNoError",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "?patient=Patient/${patientId}&code=http://loinc.org|718-7"
          }
        },
        {
          "assert": {
            "responseCode": "200",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Observation).dataAbsentReason.coding.code.where($this = 'not-performed').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidation",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "/${pathResultId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidationObligationPair",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Observation",
            "encodeRequestUrl": true,
            "params": "/${pathResultAbsentId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-diagnosticresult-path",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}