Module: DaVinciPASTestKit::Generator::MustSupportCheckProfiles

Defined in:
lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb

Constant Summary collapse

SUBMIT_REQUEST_REQUIRED_PROFILES =
[
  'PAS Request Bundle',
  'PAS Beneficiary Patient',
  'PAS Claim Update',
  'PAS Coverage',
  'PAS Device Request',
  'PAS Encounter',
  'PAS Insurer Organization',
  'PAS Medication Request',
  'PAS Nutrition Order',
  'PAS Practitioner',
  'PAS PractitionerRole',
  'PAS Requestor Organization',
  'PAS Service Request',
  'PAS Subscriber Patient'
].freeze
SUBMIT_RESPONSE_REQUIRED_PROFILES =
[
  'PAS Beneficiary Patient',
  'PAS Claim Response',
  'PAS CommunicationRequest',
  'PAS Insurer Organization',
  'PAS Practitioner',
  'PAS PractitionerRole',
  'PAS Requestor Organization',
  'PAS Response Bundle',
  'PAS Task'
].freeze
INQUIRY_REQUEST_REQUIRED_PROFILES =
[
  'PAS Beneficiary Patient',
  'PAS Claim Inquiry',
  'PAS Coverage',
  'PAS Inquiry Request Bundle',
  'PAS Insurer Organization',
  'PAS Practitioner',
  'PAS PractitionerRole',
  'PAS Requestor Organization',
  'PAS Subscriber Patient'
].freeze
INQUIRY_RESPONSE_REQUIRED_PROFILES =
[
  'PAS Beneficiary Patient',
  'PAS Claim Inquiry Response',
  'PAS Inquiry Response Bundle',
  'PAS Insurer Organization',
  'PAS Practitioner',
  'PAS PractitionerRole',
  'PAS Requestor Organization',
  'PAS Task'
].freeze
OPTIONAL_PROFILES =
[
  'PAS Medication Request',
  'PAS Service Request',
  'PAS Device Request',
  'PAS Nutrition Order'
].freeze

Class Method Summary collapse

Class Method Details

.inquiry_request_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb', line 72

def inquiry_request_group?(group)
  INQUIRY_REQUEST_REQUIRED_PROFILES.include?(group.profile_name)
end

.inquiry_response_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb', line 76

def inquiry_response_group?(group)
  INQUIRY_RESPONSE_REQUIRED_PROFILES.include?(group.profile_name)
end

.optional_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb', line 80

def optional_group?(group)
  OPTIONAL_PROFILES.include?(group.profile_name)
end

.submit_request_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb', line 64

def submit_request_group?(group)
  SUBMIT_REQUEST_REQUIRED_PROFILES.include?(group.profile_name)
end

.submit_response_group?(group) ⇒ Boolean

Returns:

  • (Boolean)


68
69
70
# File 'lib/davinci_pas_test_kit/generator/must_support_check_profiles.rb', line 68

def submit_response_group?(group)
  SUBMIT_RESPONSE_REQUIRED_PROFILES.include?(group.profile_name)
end