Module: ONCCertificationG10TestKit::G10Options

Included in:
BulkExportValidationTester, LimitedScopeGrantTest, ProfileSelector, SMARTScopesTest, SMARTWellKnownCapabilitiesTest
Defined in:
lib/onc_certification_g10_test_kit/g10_options.rb

Constant Summary collapse

US_CORE_3 =
'us_core_3'.freeze
US_CORE_4 =
'us_core_4'.freeze
US_CORE_5 =
'us_core_5'.freeze
US_CORE_6 =
'us_core_6'.freeze
US_CORE_7 =
'us_core_7'.freeze
US_CORE_VERSION_NUMBERS =
{
  US_CORE_3 => '3.1.1',
  US_CORE_4 => '4.0.0',
  US_CORE_5 => '5.0.1',
  US_CORE_6 => '6.1.0',
  US_CORE_7 => '7.0.0'
}.freeze
BULK_DATA_1 =
'multi_patient_api_stu1'.freeze
BULK_DATA_2 =
'multi_patient_api_stu2'.freeze
SMART_1 =
'smart_app_launch_1'.freeze
SMART_2 =
'smart_app_launch_2'.freeze
SMART_2_2 =
'smart_app_launch_2_2'.freeze
US_CORE_3_REQUIREMENT =
{ us_core_version: US_CORE_3 }.freeze
US_CORE_4_REQUIREMENT =
{ us_core_version: US_CORE_4 }.freeze
US_CORE_5_REQUIREMENT =
{ us_core_version: US_CORE_5 }.freeze
US_CORE_6_REQUIREMENT =
{ us_core_version: US_CORE_6 }.freeze
US_CORE_7_REQUIREMENT =
{ us_core_version: US_CORE_7 }.freeze
BULK_DATA_1_REQUIREMENT =
{ multi_patient_version: BULK_DATA_1 }.freeze
BULK_DATA_2_REQUIREMENT =
{ multi_patient_version: BULK_DATA_2 }.freeze
SMART_1_REQUIREMENT =
{ smart_app_launch_version: SMART_1 }.freeze
SMART_2_REQUIREMENT =
{ smart_app_launch_version: SMART_2 }.freeze
SMART_2_2_REQUIREMENT =
{ smart_app_launch_version: SMART_2_2 }.freeze

Instance Method Summary collapse

Instance Method Details

#us_core_7_and_above?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 61

def us_core_7_and_above?
  us_core_version[-1].to_i > 6
end

#us_core_versionObject



37
38
39
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 37

def us_core_version
  suite_options[:us_core_version]
end

#using_us_core_3?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 41

def using_us_core_3?
  us_core_version == US_CORE_3
end

#using_us_core_4?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 45

def using_us_core_4?
  us_core_version == US_CORE_4
end

#using_us_core_5?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 49

def using_us_core_5?
  us_core_version == US_CORE_5
end

#using_us_core_6?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 53

def using_us_core_6?
  us_core_version == US_CORE_6
end

#using_us_core_7?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 57

def using_us_core_7?
  us_core_version == US_CORE_7
end

#versioned_us_core_moduleObject



65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/onc_certification_g10_test_kit/g10_options.rb', line 65

def versioned_us_core_module
  case us_core_version
  when US_CORE_7
    USCoreTestKit::USCoreV700
  when US_CORE_6
    USCoreTestKit::USCoreV610
  when US_CORE_5
    USCoreTestKit::USCoreV501
  when US_CORE_4
    USCoreTestKit::USCoreV400
  else
    USCoreTestKit::USCoreV311
  end
end