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

: AU Core Encounter — SHALL-level conformance - JSON Representation

Active as of 2026-10-23

Raw json | Download

{
  "resourceType" : "TestScript",
  "id" : "au-core-encounter",
  "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-10-23T03:11:59+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
          }
        }
      ]
    }
  ]
}