ckm_client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +26 -0
- data/Gemfile +2 -16
- data/Gemfile.lock +33 -33
- data/Rakefile +1 -14
- data/bin/ckmc +2 -17
- data/ckm_client.gemspec +41 -0
- data/features/{ckm_client.feature → soap_interface.feature} +10 -5
- data/features/step_definitions/soap_interface.steps.rb +51 -0
- data/lib/openehr/ckm_client/cli.rb +29 -0
- data/lib/openehr/ckm_client/soap_interface.rb +35 -0
- data/lib/openehr/ckm_client/version.rb +5 -0
- data/lib/openehr/ckm_client.rb +4 -21
- data/lib/openehr.rb +1 -1
- data/spec/openehr/ckm_client/soap_interface_spec.rb +37 -0
- metadata +53 -59
- data/features/step_definitions/ckm_client_steps.rb +0 -37
- data/spec/openehr/ckm_client_spec.rb +0 -35
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bece0bab89daadab517097e731b7f1704deac94c
|
4
|
+
data.tar.gz: e3b6bb1dafd32672dbd1df57a276eab92249f56f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 98aaec17bce043bd848744accfe884e699517e9d92c485f0f9f6b345f2a3c8bdeab2c92485f3a37519f89e55f8a69f0e3be72bea492dc9a021cf291a46fc8e21
|
7
|
+
data.tar.gz: 95a0d9d74da16cd2d6d7a6ea36d908ebd8c66fd0224ef77d61fbb9dba24cb693879872c6f7d74b610e5505e286f7450d3fbeb616a153bc84cc8f47945b801319
|
data/.gitignore
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
*~
|
2
|
+
*#
|
3
|
+
|
4
|
+
\#*
|
5
|
+
.\#*
|
6
|
+
|
7
|
+
|
8
|
+
*.gem
|
9
|
+
*.rbc
|
10
|
+
.bundle
|
11
|
+
*.lock
|
12
|
+
.config
|
13
|
+
coverage
|
14
|
+
InstalledFiles
|
15
|
+
lib/bundler/man
|
16
|
+
pkg
|
17
|
+
rdoc
|
18
|
+
spec/reports
|
19
|
+
test/tmp
|
20
|
+
test/version_tmp
|
21
|
+
tmp
|
22
|
+
|
23
|
+
# YARD artifacts
|
24
|
+
.yardoc
|
25
|
+
_yardoc
|
26
|
+
doc/
|
data/Gemfile
CHANGED
@@ -1,17 +1,3 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
gem 'jeweler'
|
5
|
-
|
6
|
-
group :test, :development do
|
7
|
-
gem 'rspec'
|
8
|
-
gem 'cucumber'
|
9
|
-
gem 'guard'
|
10
|
-
gem 'guard-spork'
|
11
|
-
gem 'spork', '~> 1.0.0.rc'
|
12
|
-
gem 'guard-rspec', '~> 2.4.0'
|
13
|
-
gem 'guard-cucumber'
|
14
|
-
gem 'listen', '0.6'
|
15
|
-
gem 'rb-kqueue'
|
16
|
-
gem 'libnotify'
|
17
|
-
end
|
3
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ckm_client (0.0.2)
|
5
|
+
soap4r-ruby1.9
|
6
|
+
thor
|
7
|
+
|
1
8
|
GEM
|
2
|
-
remote:
|
9
|
+
remote: https://rubygems.org/
|
3
10
|
specs:
|
4
|
-
builder (3.
|
5
|
-
childprocess (0.3.
|
6
|
-
ffi (~> 1.0, >= 1.0.
|
7
|
-
coderay (1.0.
|
8
|
-
cucumber (1.2.
|
11
|
+
builder (3.2.0)
|
12
|
+
childprocess (0.3.9)
|
13
|
+
ffi (~> 1.0, >= 1.0.11)
|
14
|
+
coderay (1.0.9)
|
15
|
+
cucumber (1.2.3)
|
9
16
|
builder (>= 2.1.2)
|
10
17
|
diff-lcs (>= 1.1.3)
|
11
|
-
gherkin (~> 2.11.
|
12
|
-
|
13
|
-
diff-lcs (1.1
|
14
|
-
ffi (1.
|
18
|
+
gherkin (~> 2.11.6)
|
19
|
+
multi_json (~> 1.3)
|
20
|
+
diff-lcs (1.2.1)
|
21
|
+
ffi (1.4.0)
|
15
22
|
gherkin (2.11.6)
|
16
23
|
json (>= 1.7.6)
|
17
|
-
git (1.2.5)
|
18
24
|
guard (1.6.2)
|
19
25
|
listen (>= 0.6.0)
|
20
26
|
lumberjack (>= 1.0.2)
|
@@ -24,42 +30,36 @@ GEM
|
|
24
30
|
guard-cucumber (1.3.2)
|
25
31
|
cucumber (>= 1.2.0)
|
26
32
|
guard (>= 1.1.0)
|
27
|
-
guard-rspec (2.4.
|
33
|
+
guard-rspec (2.4.1)
|
28
34
|
guard (>= 1.1)
|
29
35
|
rspec (~> 2.11)
|
30
|
-
guard-spork (1.
|
36
|
+
guard-spork (1.5.0)
|
31
37
|
childprocess (>= 0.2.3)
|
32
38
|
guard (>= 1.1)
|
33
39
|
spork (>= 0.8.4)
|
34
|
-
|
35
|
-
bundler (~> 1.0)
|
36
|
-
git (>= 1.2.5)
|
37
|
-
rake
|
38
|
-
rdoc
|
39
|
-
json (1.7.6)
|
40
|
+
json (1.7.7)
|
40
41
|
libnotify (0.8.0)
|
41
42
|
ffi (>= 1.0.11)
|
42
43
|
listen (0.6.0)
|
43
44
|
lumberjack (1.0.2)
|
44
45
|
method_source (0.8.1)
|
45
|
-
|
46
|
+
multi_json (1.7.1)
|
47
|
+
pry (0.9.12)
|
46
48
|
coderay (~> 1.0.5)
|
47
49
|
method_source (~> 0.8)
|
48
50
|
slop (~> 3.4)
|
49
51
|
rake (10.0.3)
|
50
52
|
rb-kqueue (0.2.0)
|
51
53
|
ffi (>= 0.5.0)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
rspec-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
rspec-
|
60
|
-
|
61
|
-
rspec-mocks (2.12.2)
|
62
|
-
slop (3.4.3)
|
54
|
+
rspec (2.13.0)
|
55
|
+
rspec-core (~> 2.13.0)
|
56
|
+
rspec-expectations (~> 2.13.0)
|
57
|
+
rspec-mocks (~> 2.13.0)
|
58
|
+
rspec-core (2.13.1)
|
59
|
+
rspec-expectations (2.13.0)
|
60
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
61
|
+
rspec-mocks (2.13.0)
|
62
|
+
slop (3.4.4)
|
63
63
|
soap4r-ruby1.9 (2.0.5)
|
64
64
|
spork (1.0.0rc3)
|
65
65
|
terminal-table (1.4.5)
|
@@ -69,15 +69,15 @@ PLATFORMS
|
|
69
69
|
ruby
|
70
70
|
|
71
71
|
DEPENDENCIES
|
72
|
+
ckm_client!
|
72
73
|
cucumber
|
73
74
|
guard
|
74
75
|
guard-cucumber
|
75
76
|
guard-rspec (~> 2.4.0)
|
76
77
|
guard-spork
|
77
|
-
jeweler
|
78
78
|
libnotify
|
79
79
|
listen (= 0.6)
|
80
|
+
rake
|
80
81
|
rb-kqueue
|
81
82
|
rspec
|
82
|
-
soap4r-ruby1.9
|
83
83
|
spork (~> 1.0.0.rc)
|
data/Rakefile
CHANGED
@@ -3,22 +3,9 @@
|
|
3
3
|
|
4
4
|
require 'rubygems'
|
5
5
|
require 'bundler'
|
6
|
+
require 'bundler/gem_tasks'
|
6
7
|
require 'rake'
|
7
8
|
|
8
|
-
require 'jeweler'
|
9
|
-
Jeweler::Tasks.new do |gem|
|
10
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
11
|
-
gem.name = "ckm_client"
|
12
|
-
gem.homepage = "http://github.com/skoba/ckm_client"
|
13
|
-
gem.license = "Apache 2.0"
|
14
|
-
gem.summary = %Q{The openEHR CKM command line client}
|
15
|
-
gem.description = %Q{A client module for openEHR clinical knowlege manager}
|
16
|
-
gem.email = "skoba@moss.gr.jp"
|
17
|
-
gem.authors = ["Shinji KOBAYASHI"]
|
18
|
-
# dependencies defined in Gemfile
|
19
|
-
end
|
20
|
-
Jeweler::RubygemsDotOrgTasks.new
|
21
|
-
|
22
9
|
require 'rspec/core'
|
23
10
|
require 'rspec/core/rake_task'
|
24
11
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
data/bin/ckmc
CHANGED
@@ -1,20 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$:.unshift(File.expand_path('../../lib', __FILE__))
|
3
|
-
require 'openehr/ckm_client'
|
3
|
+
require 'openehr/ckm_client/cli'
|
4
4
|
|
5
|
-
|
6
|
-
when 'help'
|
7
|
-
puts <<USAGE
|
8
|
-
Usage:
|
9
|
-
ckmc <command> [<args>]
|
10
|
-
|
11
|
-
Commands supported:
|
12
|
-
fetch Retrieve archetype by archetype_id
|
13
|
-
search query archetype by keyword
|
14
|
-
help show this help
|
15
|
-
USAGE
|
16
|
-
when 'fetch'
|
17
|
-
puts OpenEHR::CKMClient.new.fetch(ARGV[0])
|
18
|
-
when 'search'
|
19
|
-
puts 'Not yet implemented'
|
20
|
-
end
|
5
|
+
OpenEHR::CKMClient::CLI.start
|
data/ckm_client.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "openehr/ckm_client/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "ckm_client"
|
7
|
+
gem.version = OpenEHR::CKMClient::VERSION
|
8
|
+
gem.platform = Gem::Platform::RUBY
|
9
|
+
gem.authors = ["Shinji KOBAYASHI"]
|
10
|
+
gem.email = "skoba@moss.gr.jp"
|
11
|
+
|
12
|
+
gem.summary = 'CKM client and command line tool'
|
13
|
+
gem.description = 'CKM client via web services and command line tool'
|
14
|
+
gem.homepage = 'http://openehr.jp'
|
15
|
+
gem.licenses = 'Apache 2.0'
|
16
|
+
gem.executables = ["ckmc"]
|
17
|
+
gem.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
gem.files = `git ls-files`.split("\n")
|
22
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
gem.require_paths = ["lib"]
|
24
|
+
|
25
|
+
gem.add_dependency('thor')
|
26
|
+
gem.add_dependency('soap4r-ruby1.9')
|
27
|
+
|
28
|
+
gem.add_development_dependency('rake')
|
29
|
+
gem.add_development_dependency('rspec')
|
30
|
+
gem.add_development_dependency('cucumber')
|
31
|
+
gem.add_development_dependency('guard')
|
32
|
+
gem.add_development_dependency('guard-spork')
|
33
|
+
gem.add_development_dependency('spork', '~> 1.0.0.rc')
|
34
|
+
gem.add_development_dependency('guard-rspec', '~> 2.4.0')
|
35
|
+
gem.add_development_dependency('guard-cucumber')
|
36
|
+
gem.add_development_dependency('listen', '0.6')
|
37
|
+
gem.add_development_dependency('rb-kqueue')
|
38
|
+
gem.add_development_dependency('libnotify')
|
39
|
+
end
|
40
|
+
|
41
|
+
|
@@ -1,22 +1,27 @@
|
|
1
|
-
Feature: CKM
|
1
|
+
Feature: CKM client access CKM repository via SOAP interface
|
2
2
|
|
3
3
|
CKM(Clinical Knowledge Manager) is a repository of archetypes, which
|
4
4
|
contains established clincal inforomation models maintained by the
|
5
5
|
openEHR Project(http://www.openehr.org). This CKM client accesses
|
6
|
-
and queries archetype to CKM(http://www.openehr.org/
|
7
|
-
others
|
6
|
+
and queries archetype to CKM(http://www.openehr.org/ckm/) or
|
7
|
+
others by SOAP interface
|
8
8
|
|
9
9
|
Scenario: repository is assigned by constructor
|
10
10
|
Given a CKM repository
|
11
|
-
When I cunstruct
|
11
|
+
When I cunstruct SOAP interface instance with repository option
|
12
12
|
Then CKM repository is assigned
|
13
13
|
|
14
14
|
Scenario: repository is not assigned
|
15
15
|
Given No repository assigned
|
16
|
-
When I construct
|
16
|
+
When I construct SOAP interface instance
|
17
17
|
Then The openEHR official CKM is assigned as default
|
18
18
|
|
19
19
|
Scenario: fetch adl file by archetype ID
|
20
20
|
Given archetype ID
|
21
21
|
When I fetch adl file by archetype ID
|
22
22
|
Then ID matched archetype should be retrieved
|
23
|
+
|
24
|
+
Scenario: query archetype by partial ID
|
25
|
+
Given partial archetype ID
|
26
|
+
When I query archetype by partial ID
|
27
|
+
Then Partially matched archetype list should be retrieved
|
@@ -0,0 +1,51 @@
|
|
1
|
+
OPENEHR_CKM = 'http://openehr.org/ckm/services/ArchetypeFinderBean?wsdl'
|
2
|
+
|
3
|
+
Given /^a CKM repository$/ do
|
4
|
+
@repository = 'http://www.openehr.org/'
|
5
|
+
end
|
6
|
+
|
7
|
+
When /^I cunstruct SOAP interface instance with repository option$/ do
|
8
|
+
@si = OpenEHR::CKMClient::SOAPInterface.new(@repository)
|
9
|
+
end
|
10
|
+
|
11
|
+
Then /^CKM repository is assigned$/ do
|
12
|
+
@si.repository.should == @repository
|
13
|
+
end
|
14
|
+
|
15
|
+
Given /^No repository assigned$/ do
|
16
|
+
end
|
17
|
+
|
18
|
+
When /^I construct SOAP interface instance$/ do
|
19
|
+
@si = OpenEHR::CKMClient::SOAPInterface.new
|
20
|
+
end
|
21
|
+
|
22
|
+
Then /^The openEHR official CKM is assigned as default$/ do
|
23
|
+
@si.repository.should == OPENEHR_CKM
|
24
|
+
end
|
25
|
+
|
26
|
+
Given /^archetype ID$/ do
|
27
|
+
@archetype_id = 'openEHR-EHR-OBSERVATION.blood_pressure.v1'
|
28
|
+
end
|
29
|
+
|
30
|
+
When /^I fetch adl file by archetype ID$/ do
|
31
|
+
si = OpenEHR::CKMClient::SOAPInterface.new
|
32
|
+
@adl_file = si.fetch(@archetype_id)
|
33
|
+
end
|
34
|
+
|
35
|
+
Then /^ID matched archetype should be retrieved$/ do
|
36
|
+
@adl_file.should match /#{@ardchetype_id}/
|
37
|
+
end
|
38
|
+
|
39
|
+
Given /^partial archetype ID$/ do
|
40
|
+
@partial_id = 'blood'
|
41
|
+
end
|
42
|
+
|
43
|
+
When /^I query archetype by partial ID$/ do
|
44
|
+
@archetypes = OpenEHR::CKMClient::SOAPInterface.new.search(@partial_id)
|
45
|
+
end
|
46
|
+
|
47
|
+
Then /^Partially matched archetype list should be retrieved$/ do
|
48
|
+
@archetypes.each do |archetype|
|
49
|
+
archetype.should match /blood/
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'thor'
|
2
|
+
module OpenEHR
|
3
|
+
module CKMClient
|
4
|
+
class CLI < Thor
|
5
|
+
desc 'fetch', 'Retrieve archetype by archetype_id'
|
6
|
+
def fetch(archtype_id)
|
7
|
+
puts OpenEHR::CKMClient.new.fetch(archtype_id)
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'search', 'Query archetype by partial id'
|
11
|
+
def search(part_id)
|
12
|
+
puts OpenEHR::CKMClient.new.search(part_id)
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'help', 'Show this help'
|
16
|
+
def help
|
17
|
+
puts <<USAGE
|
18
|
+
Usage:
|
19
|
+
ckmc <command> [<args>]
|
20
|
+
|
21
|
+
Commands supported:
|
22
|
+
fetch Retrieve archetype by archetype_id
|
23
|
+
search query archetype by keyword
|
24
|
+
help show this help
|
25
|
+
USAGE
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
CKM_REPOSITORY = 'http://openehr.org/ckm/services/ArchetypeFinderBean?wsdl'
|
2
|
+
|
3
|
+
module OpenEHR
|
4
|
+
module CKMClient
|
5
|
+
class SOAPInterface
|
6
|
+
attr_reader :repository
|
7
|
+
|
8
|
+
def initialize(repository=CKM_REPOSITORY)
|
9
|
+
@repository = repository
|
10
|
+
end
|
11
|
+
|
12
|
+
def fetch(id)
|
13
|
+
SOAPDriver.new(@repository).get_adl_by_id(id)
|
14
|
+
end
|
15
|
+
|
16
|
+
def search(partial_id)
|
17
|
+
SOAPDriver.new(@repository).get_archetypes_by_partial_id(partial_id)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class SOAPDriver
|
22
|
+
def initialize(repository)
|
23
|
+
@driver = SOAP::WSDLDriverFactory.new(repository).create_rpc_driver
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_adl_by_id(id)
|
27
|
+
@driver.getArchetypeInADL(archetypeId: id).m_return
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_archetypes_by_partial_id(id)
|
31
|
+
@driver.getArchetypeIdsFromPartialId(archetypeIdPart: id).m_return
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/openehr/ckm_client.rb
CHANGED
@@ -1,25 +1,8 @@
|
|
1
1
|
require 'soap/wsdlDriver'
|
2
|
-
CKM_REPOSITORY = 'http://openehr.org/knowledge/services/ArchetypeFinderBean?wsdl'
|
3
|
-
module OpenEHR
|
4
|
-
class CKMClient
|
5
|
-
attr_reader :repository
|
6
|
-
|
7
|
-
def initialize(repository=CKM_REPOSITORY)
|
8
|
-
@repository = repository
|
9
|
-
end
|
10
|
-
|
11
|
-
def fetch(id)
|
12
|
-
SOAPDriver.new(@repository).get_adl_by_id(id)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class SOAPDriver
|
17
|
-
def initialize(repository)
|
18
|
-
@driver = SOAP::WSDLDriverFactory.new(repository).create_rpc_driver
|
19
|
-
end
|
20
2
|
|
21
|
-
|
22
|
-
|
23
|
-
|
3
|
+
module OpenEHR
|
4
|
+
module CKMClient
|
5
|
+
require 'openehr/ckm_client/cli'
|
6
|
+
require 'openehr/ckm_client/soap_interface'
|
24
7
|
end
|
25
8
|
end
|
data/lib/openehr.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
REPOSITORY = 'http://www.openehr.org/'
|
4
|
+
OPENEHR_REPOSITORY = 'http://openehr.org/ckm/services/ArchetypeFinderBean?wsdl'
|
5
|
+
ARCHETYPE_ID = 'openEHR-EHR-OBSERVATION.blood_pressure.v1'
|
6
|
+
|
7
|
+
module OpenEHR
|
8
|
+
module CKMClient
|
9
|
+
describe SOAPInterface do
|
10
|
+
describe "#initialize" do
|
11
|
+
context 'repository is assigned as constructor parameter' do
|
12
|
+
let(:si) { OpenEHR::CKMClient::SOAPInterface.new(REPOSITORY) }
|
13
|
+
|
14
|
+
it 'respoistory is REPOSITORY' do
|
15
|
+
si.repository.should == REPOSITORY
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'Default repository is openEHR CKM repository' do
|
20
|
+
let(:si) { OpenEHR::CKMClient::SOAPInterface.new }
|
21
|
+
|
22
|
+
it 'default repository is openEHR ckm repository' do
|
23
|
+
si.repository.should == OPENEHR_REPOSITORY
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "#fetch" do
|
29
|
+
let(:si) { OpenEHR::CKMClient::SOAPInterface.new }
|
30
|
+
|
31
|
+
it 'fetch archetype by id' do
|
32
|
+
si.fetch(ARCHETYPE_ID).should match /#{ARCHETYPE_ID}/
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,116 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ckm_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Shinji KOBAYASHI
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: thor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
28
|
+
name: soap4r-ruby1.9
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
44
53
|
- !ruby/object:Gem::Version
|
45
54
|
version: '0'
|
46
55
|
- !ruby/object:Gem::Dependency
|
47
56
|
name: rspec
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
58
|
requirements:
|
51
|
-
- -
|
59
|
+
- - '>='
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
- !ruby/object:Gem::Dependency
|
63
70
|
name: cucumber
|
64
71
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
72
|
requirements:
|
67
|
-
- -
|
73
|
+
- - '>='
|
68
74
|
- !ruby/object:Gem::Version
|
69
75
|
version: '0'
|
70
76
|
type: :development
|
71
77
|
prerelease: false
|
72
78
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
79
|
requirements:
|
75
|
-
- -
|
80
|
+
- - '>='
|
76
81
|
- !ruby/object:Gem::Version
|
77
82
|
version: '0'
|
78
83
|
- !ruby/object:Gem::Dependency
|
79
84
|
name: guard
|
80
85
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
86
|
requirements:
|
83
|
-
- -
|
87
|
+
- - '>='
|
84
88
|
- !ruby/object:Gem::Version
|
85
89
|
version: '0'
|
86
90
|
type: :development
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
93
|
requirements:
|
91
|
-
- -
|
94
|
+
- - '>='
|
92
95
|
- !ruby/object:Gem::Version
|
93
96
|
version: '0'
|
94
97
|
- !ruby/object:Gem::Dependency
|
95
98
|
name: guard-spork
|
96
99
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
100
|
requirements:
|
99
|
-
- -
|
101
|
+
- - '>='
|
100
102
|
- !ruby/object:Gem::Version
|
101
103
|
version: '0'
|
102
104
|
type: :development
|
103
105
|
prerelease: false
|
104
106
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
107
|
requirements:
|
107
|
-
- -
|
108
|
+
- - '>='
|
108
109
|
- !ruby/object:Gem::Version
|
109
110
|
version: '0'
|
110
111
|
- !ruby/object:Gem::Dependency
|
111
112
|
name: spork
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
@@ -118,7 +118,6 @@ dependencies:
|
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
121
|
requirements:
|
123
122
|
- - ~>
|
124
123
|
- !ruby/object:Gem::Version
|
@@ -126,7 +125,6 @@ dependencies:
|
|
126
125
|
- !ruby/object:Gem::Dependency
|
127
126
|
name: guard-rspec
|
128
127
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
128
|
requirements:
|
131
129
|
- - ~>
|
132
130
|
- !ruby/object:Gem::Version
|
@@ -134,7 +132,6 @@ dependencies:
|
|
134
132
|
type: :development
|
135
133
|
prerelease: false
|
136
134
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
135
|
requirements:
|
139
136
|
- - ~>
|
140
137
|
- !ruby/object:Gem::Version
|
@@ -142,23 +139,20 @@ dependencies:
|
|
142
139
|
- !ruby/object:Gem::Dependency
|
143
140
|
name: guard-cucumber
|
144
141
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
142
|
requirements:
|
147
|
-
- -
|
143
|
+
- - '>='
|
148
144
|
- !ruby/object:Gem::Version
|
149
145
|
version: '0'
|
150
146
|
type: :development
|
151
147
|
prerelease: false
|
152
148
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
149
|
requirements:
|
155
|
-
- -
|
150
|
+
- - '>='
|
156
151
|
- !ruby/object:Gem::Version
|
157
152
|
version: '0'
|
158
153
|
- !ruby/object:Gem::Dependency
|
159
154
|
name: listen
|
160
155
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
156
|
requirements:
|
163
157
|
- - '='
|
164
158
|
- !ruby/object:Gem::Version
|
@@ -166,7 +160,6 @@ dependencies:
|
|
166
160
|
type: :development
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
163
|
requirements:
|
171
164
|
- - '='
|
172
165
|
- !ruby/object:Gem::Version
|
@@ -174,36 +167,32 @@ dependencies:
|
|
174
167
|
- !ruby/object:Gem::Dependency
|
175
168
|
name: rb-kqueue
|
176
169
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
170
|
requirements:
|
179
|
-
- -
|
171
|
+
- - '>='
|
180
172
|
- !ruby/object:Gem::Version
|
181
173
|
version: '0'
|
182
174
|
type: :development
|
183
175
|
prerelease: false
|
184
176
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
177
|
requirements:
|
187
|
-
- -
|
178
|
+
- - '>='
|
188
179
|
- !ruby/object:Gem::Version
|
189
180
|
version: '0'
|
190
181
|
- !ruby/object:Gem::Dependency
|
191
182
|
name: libnotify
|
192
183
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
184
|
requirements:
|
195
|
-
- -
|
185
|
+
- - '>='
|
196
186
|
- !ruby/object:Gem::Version
|
197
187
|
version: '0'
|
198
188
|
type: :development
|
199
189
|
prerelease: false
|
200
190
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
191
|
requirements:
|
203
|
-
- -
|
192
|
+
- - '>='
|
204
193
|
- !ruby/object:Gem::Version
|
205
194
|
version: '0'
|
206
|
-
description:
|
195
|
+
description: CKM client via web services and command line tool
|
207
196
|
email: skoba@moss.gr.jp
|
208
197
|
executables:
|
209
198
|
- ckmc
|
@@ -212,6 +201,7 @@ extra_rdoc_files:
|
|
212
201
|
- LICENSE.txt
|
213
202
|
- README.md
|
214
203
|
files:
|
204
|
+
- .gitignore
|
215
205
|
- .travis.yml
|
216
206
|
- Gemfile
|
217
207
|
- Gemfile.lock
|
@@ -221,36 +211,40 @@ files:
|
|
221
211
|
- Rakefile
|
222
212
|
- VERSION
|
223
213
|
- bin/ckmc
|
224
|
-
-
|
225
|
-
- features/
|
214
|
+
- ckm_client.gemspec
|
215
|
+
- features/soap_interface.feature
|
216
|
+
- features/step_definitions/soap_interface.steps.rb
|
226
217
|
- features/support/env.rb
|
227
218
|
- lib/openehr.rb
|
228
219
|
- lib/openehr/ckm_client.rb
|
229
|
-
-
|
220
|
+
- lib/openehr/ckm_client/cli.rb
|
221
|
+
- lib/openehr/ckm_client/soap_interface.rb
|
222
|
+
- lib/openehr/ckm_client/version.rb
|
223
|
+
- spec/openehr/ckm_client/soap_interface_spec.rb
|
230
224
|
- spec/spec_helper.rb
|
231
|
-
homepage: http://
|
225
|
+
homepage: http://openehr.jp
|
232
226
|
licenses:
|
233
227
|
- Apache 2.0
|
228
|
+
metadata: {}
|
234
229
|
post_install_message:
|
235
230
|
rdoc_options: []
|
236
231
|
require_paths:
|
237
232
|
- lib
|
238
233
|
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
-
none: false
|
240
234
|
requirements:
|
241
|
-
- -
|
235
|
+
- - '>='
|
242
236
|
- !ruby/object:Gem::Version
|
243
237
|
version: '0'
|
244
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
|
-
none: false
|
246
239
|
requirements:
|
247
|
-
- -
|
240
|
+
- - '>='
|
248
241
|
- !ruby/object:Gem::Version
|
249
242
|
version: '0'
|
250
243
|
requirements: []
|
251
244
|
rubyforge_project:
|
252
|
-
rubygems_version:
|
245
|
+
rubygems_version: 2.0.3
|
253
246
|
signing_key:
|
254
|
-
specification_version:
|
255
|
-
summary:
|
247
|
+
specification_version: 4
|
248
|
+
summary: CKM client and command line tool
|
256
249
|
test_files: []
|
250
|
+
has_rdoc:
|
@@ -1,37 +0,0 @@
|
|
1
|
-
OPENEHR_CKM = 'http://openehr.org/knowledge/services/ArchetypeFinderBean?wsdl'
|
2
|
-
Given /^a CKM repository$/ do
|
3
|
-
@repository = 'http://www.openehr.org/'
|
4
|
-
end
|
5
|
-
|
6
|
-
When /^I cunstruct CKM client instance with repository option$/ do
|
7
|
-
@ckmc = OpenEHR::CKMClient.new(@repository)
|
8
|
-
end
|
9
|
-
|
10
|
-
Then /^CKM repository is assigned$/ do
|
11
|
-
@ckmc.repository.should == @repository
|
12
|
-
end
|
13
|
-
|
14
|
-
Given /^No repository assigned$/ do
|
15
|
-
end
|
16
|
-
|
17
|
-
When /^I construct CKM client instance$/ do
|
18
|
-
@ckmc = OpenEHR::CKMClient.new
|
19
|
-
end
|
20
|
-
|
21
|
-
Then /^The openEHR official CKM is assigned as default$/ do
|
22
|
-
@ckmc.repository.should == OPENEHR_CKM
|
23
|
-
end
|
24
|
-
|
25
|
-
Given /^archetype ID$/ do
|
26
|
-
@archetype_id = 'openEHR-EHR-OBSERVATION.blood_pressure.v1'
|
27
|
-
end
|
28
|
-
|
29
|
-
When /^I fetch adl file by archetype ID$/ do
|
30
|
-
ckmc = OpenEHR::CKMClient.new
|
31
|
-
@adl_file = ckmc.fetch(@archetype_id)
|
32
|
-
end
|
33
|
-
|
34
|
-
Then /^ID matched archetype should be retrieved$/ do
|
35
|
-
@adl_file.should match /#{@ardchetype_id}/
|
36
|
-
end
|
37
|
-
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
REPOSITORY = 'http://www.openehr.org/'
|
4
|
-
OPENEHR_REPOSITORY = 'http://openehr.org/knowledge/services/ArchetypeFinderBean?wsdl'
|
5
|
-
ARCHETYPE_ID = 'openEHR-EHR-OBSERVATION.blood_pressure.v1'
|
6
|
-
|
7
|
-
module OpenEHR
|
8
|
-
describe CKMClient do
|
9
|
-
describe "#initialize" do
|
10
|
-
context 'repository is assigned as constructor parameter' do
|
11
|
-
let(:ckmc) { OpenEHR::CKMClient.new(REPOSITORY) }
|
12
|
-
|
13
|
-
it 'respoistory is REPOSITORY' do
|
14
|
-
ckmc.repository.should == REPOSITORY
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
context 'Default repository is openEHR CKM repository' do
|
19
|
-
let(:ckmc) { OpenEHR::CKMClient.new }
|
20
|
-
|
21
|
-
it 'default repository is openEHR ckm repository' do
|
22
|
-
ckmc.repository.should == OPENEHR_REPOSITORY
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
describe "#fetch" do
|
28
|
-
let(:ckmc) { OpenEHR::CKMClient.new }
|
29
|
-
|
30
|
-
it 'fetch archetype by id' do
|
31
|
-
ckmc.fetch(ARCHETYPE_ID).should match /#{ARCHETYPE_ID}/
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|