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-encounter.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/jgsuess/au-core-tests/TestScript-au-core-encounter.html
URLhttp://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-encounter
Version0.1.0
Statusactive
Date2026-08-16T05:55:37+00:00
NameAUCoreEncounter
TitleAU Core Encounter — SHALL-level conformance
DescriptionCovers the SHALL-level AU Core Encounter (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+date, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's EncounterGroup (encounter_read_test, encounter_patient_search_test, encounter_date_patient_search_test, encounter_must_support_test, encounter_validation_test). Per fhirfrog/au-core-compiler#9, two SHOULD/MAY-level combinatorial search tests are additionally included — SearchByDateMultipleAnd (date=ge...&date=le..., encounter_date_multiple_and_search_test) and SearchByStatusMultipleOr (status=a,b, encounter_status_multiple_or_search_test) — because Inferno's generated group configures multi-and/multi-or combos specifically for Encounter's clinical-date and status search parameters and issue #9 calls these out by name; this is a deliberate, narrow exception to the SHALL-only scope rationale used for Patient (#6) and Condition (#8). The remaining SHOULD/MAY-level searches (status, date, class, class+patient, patient+status, patient+location, location) and the reference-resolution test are not replicated here.

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-encounter

url: TestScript AU Core Encounter — SHALL-level conformance

version: 0.1.0

name: AUCoreEncounter

title: AU Core Encounter — 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 Encounter (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+date, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's EncounterGroup (encounter_read_test, encounter_patient_search_test, encounter_date_patient_search_test, encounter_must_support_test, encounter_validation_test). Per fhirfrog/au-core-compiler#9, two SHOULD/MAY-level combinatorial search tests are additionally included — SearchByDateMultipleAnd (date=ge...&date=le..., encounter_date_multiple_and_search_test) and SearchByStatusMultipleOr (status=a,b, encounter_status_multiple_or_search_test) — because Inferno's generated group configures multi-and/multi-or combos specifically for Encounter's clinical-date and status search parameters and issue #9 calls these out by name; this is a deliberate, narrow exception to the SHALL-only scope rationale used for Patient (#6) and Condition (#8). The remaining SHOULD/MAY-level searches (status, date, class, class+patient, patient+status, patient+location, location) and the reference-resolution test are not replicated here.

fixture

id

patient-fixture

autocreate: true

autodelete: true

resource: au-core-patient-conformant

fixture

id

frog-participant

autocreate: true

autodelete: true

resource: au-core-encounter-participant

fixture

id

frog-location

autocreate: true

autodelete: true

resource: au-core-encounter-location

fixture

id

frog-service-provider

autocreate: true

autodelete: true

resource: au-core-encounter-service-provider

fixture

id

frog-reason-condition

autocreate: true

autodelete: true

resource: au-core-encounter-reason-condition

fixture

id

encounter-fixture

autocreate: true

autodelete: true

resource: au-core-encounter-conformant

variable

name: patientId

path: Patient.id

sourceId: patient-fixture

variable

name: encounterId

path: Encounter.id

sourceId: encounter-fixture

test

name: Read

action

Operations

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

action

Asserts

-ResponseWarningOnly
*okayfalse

test

name: SearchByPatient

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Encountertrue?patient=${patientId}

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Encounter).class.code.where($this = 'AMB').exists()false

test

name: SearchByPatientAndDate

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Encountertrue?patient=${patientId}&date=2024-03-01

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()false

test

name: SearchByDateMultipleAnd

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Encountertrue?date=ge2020-01-01&date=le2030-01-01

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()false

test

name: SearchByStatusMultipleOr

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Encountertrue?status=in-progress,finished

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()false

test

name: MustSupport

action

Operations

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

action

Asserts

-ExpressionWarningOnly
*Encounter.status.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.class.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.subject.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.participant.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.participant.individual.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.participant.type.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.period.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.reasonCode.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.reasonReference.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.location.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.location.location.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.serviceProvider.exists()false

action

Asserts

-ExpressionWarningOnly
*Encounter.serviceType.exists()false

test

name: ProfileValidation

action

Operations

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

action

Asserts

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

Source1

{
  "resourceType": "TestScript",
  "id": "au-core-encounter",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-encounter",
  "version": "0.1.0",
  "name": "AUCoreEncounter",
  "title": "AU Core Encounter — SHALL-level 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 SHALL-level AU Core Encounter (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+date, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's EncounterGroup (encounter_read_test, encounter_patient_search_test, encounter_date_patient_search_test, encounter_must_support_test, encounter_validation_test). Per fhirfrog/au-core-compiler#9, two SHOULD/MAY-level combinatorial search tests are additionally included — SearchByDateMultipleAnd (date=ge...&date=le..., encounter_date_multiple_and_search_test) and SearchByStatusMultipleOr (status=a,b, encounter_status_multiple_or_search_test) — because Inferno's generated group configures multi-and/multi-or combos specifically for Encounter's clinical-date and status search parameters and issue #9 calls these out by name; this is a deliberate, narrow exception to the SHALL-only scope rationale used for Patient (#6) and Condition (#8). The remaining SHOULD/MAY-level searches (status, date, class, class+patient, patient+status, patient+location, location) and the reference-resolution test are not replicated here.",
  "fixture": [
    {
      "id": "patient-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-patient-conformant"
      }
    },
    {
      "id": "frog-participant",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-encounter-participant"
      }
    },
    {
      "id": "frog-location",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-encounter-location"
      }
    },
    {
      "id": "frog-service-provider",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-encounter-service-provider"
      }
    },
    {
      "id": "frog-reason-condition",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-encounter-reason-condition"
      }
    },
    {
      "id": "encounter-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-encounter-conformant"
      }
    }
  ],
  "variable": [
    {
      "name": "patientId",
      "path": "Patient.id",
      "sourceId": "patient-fixture"
    },
    {
      "name": "encounterId",
      "path": "Encounter.id",
      "sourceId": "encounter-fixture"
    }
  ],
  "test": [
    {
      "name": "Read",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "/${encounterId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatient",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Encounter).class.code.where($this = 'AMB').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientAndDate",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}&date=2024-03-01"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByDateMultipleAnd",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "?date=ge2020-01-01&date=le2030-01-01"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByStatusMultipleOr",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "?status=in-progress,finished"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupport",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "/${encounterId}"
          }
        },
        {
          "assert": {
            "expression": "Encounter.status.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.class.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.subject.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.participant.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.participant.individual.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.participant.type.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.period.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.reasonCode.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.reasonReference.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.location.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.location.location.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.serviceProvider.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Encounter.serviceType.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidation",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Encounter",
            "encodeRequestUrl": true,
            "params": "/${encounterId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-encounter",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}