Skip to content

Commit

Permalink
Add medicare identifier search for the PractitionerRole
Browse files Browse the repository at this point in the history
Ref: #121
  • Loading branch information
projkov committed Jun 20, 2024
1 parent b5eb839 commit 82f3b8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/au_core_test_kit/generator/special_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module SpecialCases
{ display: 'HPI-I', url: 'http://ns.electronichealth.net.au/id/hi/hpii/1.0' }
].freeze

PRACTITIONER_ROLE_IDENTIFIERS = [
{ display: 'Medicare', url: 'http://ns.electronichealth.net.au/id/medicare-provider-number' }
].freeze

ORGANIZATION_IDENTIFIERS = [
{ display: 'HPI-O', url: 'http://ns.electronichealth.net.au/id/hi/hpio/1.0' },
{ display: 'ABN', url: 'http://hl7.org.au/id/abn' }
Expand All @@ -38,6 +42,10 @@ def practitioner_au_identifiers
PRACTITIONER_IDENTIFIERS
end

def practitionerrole_au_identifiers
PRACTITIONER_ROLE_IDENTIFIERS
end

def organization_au_identifiers
ORGANIZATION_IDENTIFIERS
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SpecialIdentifierSearchTestGenerator < SearchTestGenerator
class << self
def generate(ig_metadata, base_output_dir)
ig_metadata.groups.reject { |group| SpecialCases.exclude_group? group }
.select { |group| ['au_core_patient', 'au_core_practitioner', 'au_core_organization'].include? group.name }
.select { |group| ['au_core_patient', 'au_core_practitioner', 'au_core_organization', 'au_core_practitionerrole'].include? group.name }
.select { |group| group.searches.present? }
.each do |group|
group.searches.each do |search|
Expand All @@ -21,6 +21,8 @@ def generate(ig_metadata, base_output_dir)
SpecialCases.patient_au_identifiers
when 'au_core_practitioner'
SpecialCases.practitioner_au_identifiers
when 'au_core_practitionerrole'
SpecialCases.practitionerrole_au_identifiers
when 'au_core_organization'
SpecialCases.organization_au_identifiers
end
Expand Down

0 comments on commit 82f3b8e

Please sign in to comment.