Class: USCoreTestKit::Generator::MustSupportMetadataExtractorUsCore7
- Inherits:
-
Object
- Object
- USCoreTestKit::Generator::MustSupportMetadataExtractorUsCore7
- Defined in:
- lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb
Constant Summary collapse
- US_CORE_CATEGORY =
['sdoh', 'functional-status', 'disability-status', 'cognitive-status']
Instance Attribute Summary collapse
-
#must_supports ⇒ Object
Returns the value of attribute must_supports.
-
#profile ⇒ Object
Returns the value of attribute profile.
Instance Method Summary collapse
- #add_must_support_choices ⇒ Object
- #handle_special_cases ⇒ Object
-
#initialize(profile, must_supports) ⇒ MustSupportMetadataExtractorUsCore7
constructor
A new instance of MustSupportMetadataExtractorUsCore7.
- #us_core_6_extractor ⇒ Object
Constructor Details
#initialize(profile, must_supports) ⇒ MustSupportMetadataExtractorUsCore7
Returns a new instance of MustSupportMetadataExtractorUsCore7.
10 11 12 13 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 10 def initialize(profile, must_supports) self.profile = profile self.must_supports = must_supports end |
Instance Attribute Details
#must_supports ⇒ Object
Returns the value of attribute must_supports.
6 7 8 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 6 def must_supports @must_supports end |
#profile ⇒ Object
Returns the value of attribute profile.
6 7 8 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 6 def profile @profile end |
Instance Method Details
#add_must_support_choices ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 24 def add_must_support_choices more_choices = [] case profile.type when 'Procedure' more_choices << { paths: ['reasonCode', 'reasonReference'], uscdi_only: true } end if more_choices.present? must_supports[:choices] ||= [] must_supports[:choices].concat(more_choices) end end |
#handle_special_cases ⇒ Object
19 20 21 22 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 19 def handle_special_cases us_core_6_extractor.handle_special_cases add_must_support_choices end |
#us_core_6_extractor ⇒ Object
15 16 17 |
# File 'lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb', line 15 def us_core_6_extractor @us_core_6_extractor ||= MustSupportMetadataExtractorUsCore6.new(profile, must_supports) end |