Module: USCoreTestKit::WellKnownCodeSystems

Included in:
SearchTest
Defined in:
lib/us_core_test_kit/well_known_code_systems.rb

Constant Summary collapse

HL7_CODE_SYSTEMS =
[
  'http://terminology.hl7.org/CodeSystem',
  'http://hl7.org/fhir/us/core/CodeSystem'
].freeze
WELL_KNOWN_CODE_SYSTEMS =
[
  'http://loinc.org',
  'http://snomed.info/sct'
].freeze

Class Method Summary collapse

Class Method Details

.include?(system) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/us_core_test_kit/well_known_code_systems.rb', line 14

def include?(system)
  return false unless system.present?

  WELL_KNOWN_CODE_SYSTEMS.include?(system) || HL7_CODE_SYSTEMS.any? { |cs| system.start_with?(cs) }
end