au-core-practitionerrole
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-practitionerrole
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript au-core-practitionerrole url: TestScript AU Core PractitionerRole — core search & profile conformance version: 0.1.0 name: AUCorePractitionerRole title: AU Core PractitionerRole — core search & profile 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 PractitionerRole (2.0.0) requirements identified in fhirfrog/au-core-compiler#18: read, search by _id/identifier/practitioner/specialty/role/organization, the AU-specific chained-practitioner search (practitioner:Practitioner.identifier) combined with _include=PractitionerRole:practitioner, must-support element presence, and profile conformance validation. Mirrors au-fhir-core-inferno's PractitionerRoleGroup (practitioner_role_read_test, practitioner_role__id_search_test, practitioner_role_identifier_search_test, practitioner_role_identifier_medicare_search_test, practitioner_role_practitioner_search_test, practitioner_role_specialty_search_test, practitioner_role_role_search_test, practitioner_role_organization_search_test, practitioner_role_practitioner_chain_search_test, practitioner_role_practitioner_include_practitioner_test, practitioner_role_must_support_test, practitioner_role_validation_test). Issue #18's premise is that the chained-practitioner SearchParameter and the Medicare identifier search are plain query-string parameters that fhir-frog's byUrl-pass-through search executor already handles generically, so this TestScript exercises each as a single representative query rather than replicating Inferno's full SHOULD/MAY combinatorial variants (GET/POST comparison, multiple AND/OR reference forms, reference-form-only variants) — see fhirfrog/au-core-compiler#6 for the equivalent Patient-level scope rationale. The identifier fixture carries a Medicare-provider-number-typed identifier so the plain identifier search doubles as the Medicare identifier search. Per the Bundle…
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-practitionerrole
test script.version:
  value: 0.1.0
test script.name:
  value: AUCorePractitionerRole
test script.title:
  value: AU Core PractitionerRole — core search & profile 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 PractitionerRole (2.0.0) requirements identified in fhirfrog/au-core-compiler#18: read, search by _id/identifier/practitioner/specialty/role/organization, the AU-specific chained-practitioner search (practitioner:Practitioner.identifier) combined with _include=PractitionerRole:practitioner, must-support element presence, and profile conformance validation. Mirrors au-fhir-core-inferno's PractitionerRoleGroup (practitioner_role_read_test, practitioner_role__id_search_test, practitioner_role_identifier_search_test, practitioner_role_identifier_medicare_search_test, practitioner_role_practitioner_search_test, practitioner_role_specialty_search_test, practitioner_role_role_search_test, practitioner_role_organization_search_test, practitioner_role_practitioner_chain_search_test, practitioner_role_practitioner_include_practitioner_test, practitioner_role_must_support_test, practitioner_role_validation_test). Issue #18's premise is that the chained-practitioner SearchParameter and the Medicare identifier search are plain query-string parameters that fhir-frog's byUrl-pass-through search executor already handles generically, so this TestScript exercises each as a single representative query rather than replicating Inferno's full SHOULD/MAY combinatorial variants (GET/POST comparison, multiple AND/OR reference forms, reference-form-only variants) — see fhirfrog/au-core-compiler#6 for the equivalent Patient-level scope rationale. The identifier fixture carries a Medicare-provider-number-typed identifier so the plain identifier search doubles as the Medicare identifier search. Per the Bundle-validation-gap caveat noted on fhirfrog/au-core-compiler#14, validateProfileId is not attempted against the _include'd search Bundle; PractitionerRole profile conformance is instead checked via a separate plain read.
test script.fixture:
  index: 0
  element.id:
    value: practitionerrole-practitioner-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-practitionerrole-practitioner
test script.fixture:
  index: 1
  element.id:
    value: practitionerrole-organization-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-practitionerrole-organization
test script.fixture:
  index: 2
  element.id:
    value: practitionerrole-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-practitionerrole-conformant
test script.variable:
  index: 0
  test script.variable.name:
    value: practitionerRoleId
  test script.variable.path:
    value: PractitionerRole.id
  test script.variable.source id:
    value: practitionerrole-fixture
test script.variable:
  index: 1
  test script.variable.name:
    value: practitionerId
  test script.variable.path:
    value: Practitioner.id
  test script.variable.source id:
    value: practitionerrole-practitioner-fixture
test script.variable:
  index: 2
  test script.variable.name:
    value: organizationId
  test script.variable.path:
    value: Organization.id
  test script.variable.source id:
    value: practitionerrole-organization-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: PractitionerRole
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${practitionerRoleId}
  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: SearchById
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: PractitionerRole
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?_id=${practitionerRoleId}
  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(PractitionerRole).code.coding.code.where($this = '62247001').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: SearchByIdentifier
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: PractitionerRole
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?identifier=http://ns.electronichealth.net.au/id/medicare-provider-number|2449001X
  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(PractitionerRole).identifier.value.where($this = '2449001X').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 3
  test script.test.name:
    value: SearchByPractitioner
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: PractitionerRole
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?practitioner=Practitioner/${practitionerId}
  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(PractitionerRole).code.coding.code.where($this = '62247001').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 4
  test script.test.name:
    value: SearchBySpecialty
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: PractitionerRole
      test script.setup.action.operation.encode request url:
        value: true

value: read

value: search

value: search

value: search

value: search

value: ?specialty=http://snomed.info/sct|408443003

index: 1
test script.test.action.assert:
  test script.setup.action.assert.response:
    value: okay
  test script.setup.action.assert.warning only:
    value: false

index: 2
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Bundle.entry.resource.ofType(PractitionerRole).specialty.coding.code.where($this = '408443003').exists()
  test script.setup.action.assert.warning only:
    value: false

index: 5
test script.test.name:
  value: SearchByRole
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: PractitionerRole
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: ?role=http://snomed.info/sct|62247001
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(PractitionerRole).code.coding.code.where($this = '62247001').exists()
    test script.setup.action.assert.warning only:
      value: false

index: 6
test script.test.name:
  value: SearchByOrganization
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: PractitionerRole
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: ?organization=Organization/${organizationId}
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(PractitionerRole).code.coding.code.where($this = '62247001').exists()
    test script.setup.action.assert.warning only:
      value: false

index: 7
test script.test.name:
  value: ChainedPractitionerIncludePractitioner
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: PractitionerRole
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: ?practitioner:Practitioner.identifier=http://ns.electronichealth.net.au/id/hi/hpii/1.0|8003614900041692&_include=PractitionerRole:practitioner
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(PractitionerRole).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: Bundle.entry.resource.ofType(Practitioner).name.family.where($this.contains('Frog')).exists()
    test script.setup.action.assert.warning only:
      value: false

index: 8
test script.test.name:
  value: MustSupport
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: PractitionerRole
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${practitionerRoleId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.identifier.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: PractitionerRole.practitioner.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: PractitionerRole.organization.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 4
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.code.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 5
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.specialty.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 6
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.telecom.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 7
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.telecom.system.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 8
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: PractitionerRole.telecom.value.exists()
    test script.setup.action.assert.warning only:
      value: false

index: 9
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: PractitionerRole
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${practitionerRoleId}
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-practitionerrole
    test script.setup.action.assert.warning only:
      value: false