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-allergyintolerance.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/jgsuess/au-core-tests/TestScript-au-core-allergyintolerance.html
URLhttp://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-allergyintolerance
Version0.1.0
Statusactive
Date2026-08-16T05:55:37+00:00
NameAUCoreAllergyIntolerance
TitleAU Core AllergyIntolerance — SHALL-level conformance plus chained identifier search
DescriptionCovers the SHALL-level AU Core AllergyIntolerance (2.0.0) requirements: read, search by patient, must-support element presence, and profile conformance validation, plus a demonstration of the AU-specific chained patient.identifier (IHI) search that Inferno adds beyond generic us-core coverage. Also exercises the (MAY-level) standalone clinical-status search since it was explicitly called out for coverage in fhirfrog/au-core-compiler#7. Mirrors the relevant subset of au-fhir-core-inferno's AllergyIntoleranceGroup (allergy_intolerance_read_test, allergy_intolerance_patient_search_test, allergy_intolerance_clinical_status_search_test, allergy_intolerance_patient_ihi_chain_search_test, allergy_intolerance_must_support_test, allergy_intolerance_validation_test) — the SHOULD-level combined patient+clinical-status search, the Medicare/DVA chain variants (structurally identical to the IHI chain demonstrated here), the POST-search variant, and the reference-resolution test are not replicated; see fhirfrog/au-core-compiler#7 for scope rationale, following #6's precedent.

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

url: TestScript AU Core AllergyIntolerance — SHALL-level conformance plus chained identifier search

version: 0.1.0

name: AUCoreAllergyIntolerance

title: AU Core AllergyIntolerance — SHALL-level conformance plus chained identifier search

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 AllergyIntolerance (2.0.0) requirements: read, search by patient, must-support element presence, and profile conformance validation, plus a demonstration of the AU-specific chained patient.identifier (IHI) search that Inferno adds beyond generic us-core coverage. Also exercises the (MAY-level) standalone clinical-status search since it was explicitly called out for coverage in fhirfrog/au-core-compiler#7. Mirrors the relevant subset of au-fhir-core-inferno's AllergyIntoleranceGroup (allergy_intolerance_read_test, allergy_intolerance_patient_search_test, allergy_intolerance_clinical_status_search_test, allergy_intolerance_patient_ihi_chain_search_test, allergy_intolerance_must_support_test, allergy_intolerance_validation_test) — the SHOULD-level combined patient+clinical-status search, the Medicare/DVA chain variants (structurally identical to the IHI chain demonstrated here), the POST-search variant, and the reference-resolution test are not replicated; see fhirfrog/au-core-compiler#7 for scope rationale, following #6's precedent.

fixture

id

patient-fixture

autocreate: true

autodelete: true

resource: au-core-patient-conformant

fixture

id

allergyintolerance-fixture

autocreate: true

autodelete: true

resource: au-core-allergyintolerance-conformant

variable

name: patientId

path: Patient.id

sourceId: patient-fixture

variable

name: allergyIntoleranceId

path: AllergyIntolerance.id

sourceId: allergyintolerance-fixture

test

name: Read

action

Operations

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

action

Asserts

-ResponseWarningOnly
*okayfalse

test

name: SearchByPatient

action

Operations

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

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()false

test

name: SearchByClinicalStatus

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)AllergyIntolerancetrue?clinical-status=http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical|active

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()false

test

name: SearchByPatientIdentifierIHIChain

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)AllergyIntolerancetrue?patient.identifier=http://ns.electronichealth.net.au/id/hi/ihi/1.0|8003608833357361

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()false

test

name: MustSupport

action

Operations

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

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.clinicalStatus.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.verificationStatus.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.code.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.patient.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.onset.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.note.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.reaction.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.reaction.manifestation.exists()false

action

Asserts

-ExpressionWarningOnly
*AllergyIntolerance.reaction.severity.exists()false

test

name: ProfileValidation

action

Operations

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

action

Asserts

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

Source1

{
  "resourceType": "TestScript",
  "id": "au-core-allergyintolerance",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-allergyintolerance",
  "version": "0.1.0",
  "name": "AUCoreAllergyIntolerance",
  "title": "AU Core AllergyIntolerance — SHALL-level conformance plus chained identifier search",
  "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 AllergyIntolerance (2.0.0) requirements: read, search by patient, must-support element presence, and profile conformance validation, plus a demonstration of the AU-specific chained patient.identifier (IHI) search that Inferno adds beyond generic us-core coverage. Also exercises the (MAY-level) standalone clinical-status search since it was explicitly called out for coverage in fhirfrog/au-core-compiler#7. Mirrors the relevant subset of au-fhir-core-inferno's AllergyIntoleranceGroup (allergy_intolerance_read_test, allergy_intolerance_patient_search_test, allergy_intolerance_clinical_status_search_test, allergy_intolerance_patient_ihi_chain_search_test, allergy_intolerance_must_support_test, allergy_intolerance_validation_test) — the SHOULD-level combined patient+clinical-status search, the Medicare/DVA chain variants (structurally identical to the IHI chain demonstrated here), the POST-search variant, and the reference-resolution test are not replicated; see fhirfrog/au-core-compiler#7 for scope rationale, following #6's precedent.",
  "fixture": [
    {
      "id": "patient-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-patient-conformant"
      }
    },
    {
      "id": "allergyintolerance-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-allergyintolerance-conformant"
      }
    }
  ],
  "variable": [
    {
      "name": "patientId",
      "path": "Patient.id",
      "sourceId": "patient-fixture"
    },
    {
      "name": "allergyIntoleranceId",
      "path": "AllergyIntolerance.id",
      "sourceId": "allergyintolerance-fixture"
    }
  ],
  "test": [
    {
      "name": "Read",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "/${allergyIntoleranceId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatient",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByClinicalStatus",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "?clinical-status=http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical|active"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientIdentifierIHIChain",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "?patient.identifier=http://ns.electronichealth.net.au/id/hi/ihi/1.0|8003608833357361"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupport",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "/${allergyIntoleranceId}"
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.clinicalStatus.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.verificationStatus.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.code.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.patient.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.onset.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.note.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.reaction.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.reaction.manifestation.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "AllergyIntolerance.reaction.severity.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidation",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "AllergyIntolerance",
            "encodeRequestUrl": true,
            "params": "/${allergyIntoleranceId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-allergyintolerance",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}