Sha256: 9cac693bed80697475cdcf6ef6a28502c4d0b13b371e5d8af2f02d888db0e85b

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

# ticket #175
require File.dirname(__FILE__) + '/../../../spec_helper'
require File.dirname(__FILE__) + '/parser_spec_helper'

describe ADLParser do
  context 'Constraint Bindings' do
    before(:all) do
      at = adl14_archetype('adl-test-entry.constraint_binding.test.adl')
      @ao = at.ontology
    end

    it 'contraint bindings size is two' do
      @ao.constraint_bindings.size.should be 2
    end

    it 'SNOMED_CT binds local ac0001 to http://terminology.org/?terminology_id=snomed_ct&&has_relation=102002;with_target=128004' do
      @ao.constraint_binding(:terminology => 'SNOMED_CT', :code => 'ac0001').
        value.should == 'http://terminology.org/?terminology_id=snomed_ct&&has_relation=102002;with_target=128004'
    end

    it 'ICD10 binds local ac0001 to http://terminology.org/?terminology_id=icd10&&has_relation=a2;with_target=b19' do
      @ao.constraint_binding(:terminology => 'ICD10', :code => 'ac0001').
        value.should == 'http://terminology.org/?terminology_id=icd10&&has_relation=a2;with_target=b19'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
open_ehr-1.0.1 spec/lib/open_ehr/parser/constraint_binding_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/parser/constraint_binding_spec.rb