source: ruby/trunk/spec/lib/open_ehr/terminology/open_ehr_terminology_spec.rb@ 416

Last change on this file since 416 was 416, checked in by KOBAYASHI, Shinji, 14 years ago

creating terminology server for openEHR

File size: 1.2 KB
Line 
1require File.dirname(__FILE__) + '/../../../spec_helper'
2
3describe 'OpenEHRTerminology' do
4 before(:each) do
5 @term = OpenEHR::Terminology::OpenEHRTerminology.new
6 end
7
8 it 'should parse and return languages' do
9 @term.languages[0].should == {'code' => 'af', 'Description' => 'Afrikaans'}
10 end
11
12 it 'should parse and return primary rubrics' do
13 @term.primary_rubrics[0].should == {'Id' => '0', 'Language' => 'en'}
14 end
15
16 it 'should parse and return concepts' do
17 @term.concepts[0].should == {'Rubric' => 'self', 'Language' => 'en',
18 'ConceptID' => '0'}
19 end
20
21 it 'should parse and return groupers' do
22 @term.groupers[0].should == {'id' => '0', 'ConceptID' => '154'}
23 end
24
25 it 'should parse and return grouped_concepts' do
26 @term.grouped_concepts[0].should == {'ChildID' => '0', 'GrouperID' => '1'}
27 end
28
29 it 'should parse and return terminology identifiers' do
30 @term.terminology_identifiers[0].should ==
31 {'VSAB' => 'AIR93', 'Authority' => 'UMLS2003AA',
32 'SourceName' => 'AI/RHEUM,1993'}
33 end
34
35 it 'should parse and return territory' do
36 @term.territories[0].should ==
37 {'Text' => 'Afghanistan', 'ThreeLetter'=>'AFG',
38 'NumericCode' => '004', 'TwoLetter' => 'AF'}
39 end
40end
Note: See TracBrowser for help on using the repository browser.