Skip to content

Commit

Permalink
Fix must support attributes list for the lipid result
Browse files Browse the repository at this point in the history
Ref: #13
  • Loading branch information
projkov committed Feb 26, 2024
1 parent 883f274 commit 9caf31a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 53 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions lib/au_core_test_kit/generated/v0.3.0/lipid_result/metadata.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions lib/au_core_test_kit/generated/v0.3.0/metadata.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions lib/au_core_test_kit/generator/must_support_metadata_extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ def handle_special_cases
remove_observation_data_absent_reason
remove_observation_method_attribute
remove_observation_value_attribute
remove_lipid_result_attributes

case profile.version
when '3.1.1'
Expand All @@ -349,6 +350,19 @@ def handle_special_cases
end
end

def remove_lipid_result_attributes
# TODO: This code block should be discussed.
# We need to understand why there are a lot of extra attributes
# for the current Observation resource profile.
if profile.id == 'au-core-lipid-result'
@must_supports[:elements].delete_if do |element|
['identifier', 'performer', 'note',
'specimen', 'referenceRange.type',
'referenceRange.text', 'hasMember'].include? element[:path]
end
end
end

def remove_observation_value_attribute
if is_observation_without_value?
@must_supports[:elements].delete_if do |element|
Expand Down Expand Up @@ -385,6 +399,7 @@ def is_observation_without_component?
'au-core-heartrate',
'au-core-resprate',
'au-core-vitalspanel',
'au-core-lipid-result',
].include?(profile.id)
end

Expand Down

0 comments on commit 9caf31a

Please sign in to comment.