dpickett-clinical 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +7 -0
- data/Rakefile +70 -0
- data/VERSION +1 -0
- data/clinical.gemspec +69 -0
- data/features/finding_clinical_trials.feature +43 -0
- data/features/step_definitions/clinical_steps.rb +65 -0
- data/features/support/env.rb +6 -0
- data/lib/clinical/collection.rb +24 -0
- data/lib/clinical/extensions.rb +28 -0
- data/lib/clinical/intervention.rb +13 -0
- data/lib/clinical/outcome.rb +29 -0
- data/lib/clinical/primary_outcome.rb +6 -0
- data/lib/clinical/secondary_outcome.rb +6 -0
- data/lib/clinical/status.rb +42 -0
- data/lib/clinical/trial.rb +150 -0
- data/lib/clinical.rb +21 -0
- data/test/clinical/trial_test.rb +48 -0
- data/test/fixtures/lupus_single.xml +171 -0
- data/test/fixtures/open_set.xml +212 -0
- data/test/test_helper.rb +23 -0
- metadata +106 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Dan Pickett
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin require "metric_fu" rescue Exception; end
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'jeweler'
|
8
|
+
Jeweler::Tasks.new do |gem|
|
9
|
+
gem.name = "clinical"
|
10
|
+
gem.summary = %Q{a library for accessing data from ClinicalTrials.gov}
|
11
|
+
gem.email = "dpickett@enlightsolutions.com"
|
12
|
+
gem.homepage = "http://github.com/dpickett/clinical"
|
13
|
+
gem.authors = ["Dan Pickett"]
|
14
|
+
gem.add_dependency("jnunemaker-httparty", ">= 0.4.3")
|
15
|
+
gem.add_dependency("jnunemaker-happymapper", ">= 0.2.5")
|
16
|
+
gem.add_dependency("mislav-will_paginate", ">= 2.3.11")
|
17
|
+
|
18
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
|
+
end
|
20
|
+
|
21
|
+
rescue LoadError
|
22
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
23
|
+
end
|
24
|
+
|
25
|
+
require 'rake/testtask'
|
26
|
+
Rake::TestTask.new(:test) do |test|
|
27
|
+
test.libs << 'lib' << 'test'
|
28
|
+
test.pattern = 'test/**/*_test.rb'
|
29
|
+
test.verbose = true
|
30
|
+
end
|
31
|
+
|
32
|
+
begin
|
33
|
+
require 'rcov/rcovtask'
|
34
|
+
Rcov::RcovTask.new do |test|
|
35
|
+
test.libs << 'test'
|
36
|
+
test.pattern = 'test/**/*_test.rb'
|
37
|
+
test.verbose = true
|
38
|
+
end
|
39
|
+
rescue LoadError
|
40
|
+
task :rcov do
|
41
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
begin
|
46
|
+
require 'cucumber/rake/task'
|
47
|
+
Cucumber::Rake::Task.new(:features)
|
48
|
+
rescue LoadError
|
49
|
+
task :features do
|
50
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
task :default => :test
|
55
|
+
|
56
|
+
require 'rake/rdoctask'
|
57
|
+
Rake::RDocTask.new do |rdoc|
|
58
|
+
if File.exist?('VERSION.yml')
|
59
|
+
config = YAML.load(File.read('VERSION.yml'))
|
60
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
61
|
+
else
|
62
|
+
version = ""
|
63
|
+
end
|
64
|
+
|
65
|
+
rdoc.rdoc_dir = 'rdoc'
|
66
|
+
rdoc.title = "clinical #{version}"
|
67
|
+
rdoc.rdoc_files.include('README*')
|
68
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
69
|
+
end
|
70
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/clinical.gemspec
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{clinical}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Dan Pickett"]
|
9
|
+
s.date = %q{2009-06-28}
|
10
|
+
s.email = %q{dpickett@enlightsolutions.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"clinical.gemspec",
|
23
|
+
"features/finding_clinical_trials.feature",
|
24
|
+
"features/step_definitions/clinical_steps.rb",
|
25
|
+
"features/support/env.rb",
|
26
|
+
"lib/clinical.rb",
|
27
|
+
"lib/clinical/collection.rb",
|
28
|
+
"lib/clinical/extensions.rb",
|
29
|
+
"lib/clinical/intervention.rb",
|
30
|
+
"lib/clinical/outcome.rb",
|
31
|
+
"lib/clinical/primary_outcome.rb",
|
32
|
+
"lib/clinical/secondary_outcome.rb",
|
33
|
+
"lib/clinical/status.rb",
|
34
|
+
"lib/clinical/trial.rb",
|
35
|
+
"test/clinical/trial_test.rb",
|
36
|
+
"test/fixtures/lupus_single.xml",
|
37
|
+
"test/fixtures/open_set.xml",
|
38
|
+
"test/test_helper.rb"
|
39
|
+
]
|
40
|
+
s.has_rdoc = true
|
41
|
+
s.homepage = %q{http://github.com/dpickett/clinical}
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = %q{1.3.2}
|
45
|
+
s.summary = %q{a library for accessing data from ClinicalTrials.gov}
|
46
|
+
s.test_files = [
|
47
|
+
"test/clinical/trial_test.rb",
|
48
|
+
"test/test_helper.rb"
|
49
|
+
]
|
50
|
+
|
51
|
+
if s.respond_to? :specification_version then
|
52
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
53
|
+
s.specification_version = 3
|
54
|
+
|
55
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
56
|
+
s.add_runtime_dependency(%q<jnunemaker-httparty>, [">= 0.4.3"])
|
57
|
+
s.add_runtime_dependency(%q<jnunemaker-happymapper>, [">= 0.2.5"])
|
58
|
+
s.add_runtime_dependency(%q<mislav-will_paginate>, [">= 2.3.11"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<jnunemaker-httparty>, [">= 0.4.3"])
|
61
|
+
s.add_dependency(%q<jnunemaker-happymapper>, [">= 0.2.5"])
|
62
|
+
s.add_dependency(%q<mislav-will_paginate>, [">= 2.3.11"])
|
63
|
+
end
|
64
|
+
else
|
65
|
+
s.add_dependency(%q<jnunemaker-httparty>, [">= 0.4.3"])
|
66
|
+
s.add_dependency(%q<jnunemaker-happymapper>, [">= 0.2.5"])
|
67
|
+
s.add_dependency(%q<mislav-will_paginate>, [">= 2.3.11"])
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
Feature: As a potential participant for a clinical study
|
2
|
+
I want to search for clinical trials
|
3
|
+
So that I can find out more information about them
|
4
|
+
|
5
|
+
Scenario: Find open studies
|
6
|
+
Given I am searching for trials where "recruiting" is "true"
|
7
|
+
When I perform the search
|
8
|
+
Then I should get trials that are "open"
|
9
|
+
|
10
|
+
Scenario: Find closed studies
|
11
|
+
Given I am searching for trials where "recruiting" is "false"
|
12
|
+
When I perform the search
|
13
|
+
Then I should get trials that are not "open"
|
14
|
+
|
15
|
+
Scenario: Find a specific condition
|
16
|
+
Given I am searching for trials where "condition" is "hemophelia"
|
17
|
+
When I perform the extended search
|
18
|
+
Then I should get trials where the "conditions" contains "hemophelia"
|
19
|
+
|
20
|
+
Scenario: Find a specific intervention
|
21
|
+
Given I am searching for trials where "intervention" is "drug"
|
22
|
+
When I perform the extended search
|
23
|
+
Then I should get trials where the "interventions" contains "drug"
|
24
|
+
|
25
|
+
Scenario: Find a specific outcome
|
26
|
+
Given I am searching for trials where "outcome" is "toxic"
|
27
|
+
When I perform the extended search
|
28
|
+
Then I should get trials where the "outcomes" contains "toxic"
|
29
|
+
|
30
|
+
Scenario: Find a specific sponsor
|
31
|
+
Given I am searching for trials where "sponsor" is "Eli Lilly"
|
32
|
+
When I perform the extended search
|
33
|
+
Then I should get trials where the "sponsors" contains "Eli Lilly"
|
34
|
+
|
35
|
+
Scenario: Find a specific trial
|
36
|
+
When I attempt to retrieve trial "NCT00001372"
|
37
|
+
Then I should get a trial
|
38
|
+
And the trial should have an "id" of "NCT00001372"
|
39
|
+
|
40
|
+
Scenario: Find a non-existant trial
|
41
|
+
When I attempt to retrieve trial "4325785"
|
42
|
+
Then I should not get a trial
|
43
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
Given /^I am searching for trials where "([^\"]*)" is "([^\"]*)"$/ do |field, value|
|
2
|
+
@params ||= {}
|
3
|
+
|
4
|
+
if value == "true"
|
5
|
+
value = true
|
6
|
+
elsif value == "false"
|
7
|
+
value = false
|
8
|
+
end
|
9
|
+
|
10
|
+
@params[field.to_sym] = value
|
11
|
+
end
|
12
|
+
|
13
|
+
When /^I perform the search$/ do
|
14
|
+
@trials = Clinical::Trial.find(:conditions => @params)
|
15
|
+
end
|
16
|
+
|
17
|
+
When /^I perform the extended search$/ do
|
18
|
+
@trials = Clinical::Trial.find(:conditions => @params, :extended => true)
|
19
|
+
end
|
20
|
+
|
21
|
+
When /^I attempt to retrieve trial "([^\"]*)"$/ do |id|
|
22
|
+
@trial = Clinical::Trial.find_by_id(id)
|
23
|
+
end
|
24
|
+
|
25
|
+
Then /^I should get trials that are (not )?"([^\"]*)"$/ do |not_included, field|
|
26
|
+
if not_included
|
27
|
+
result = false
|
28
|
+
else
|
29
|
+
result = true
|
30
|
+
end
|
31
|
+
|
32
|
+
@trials.each do |trial|
|
33
|
+
trial.send(field + "?").should(eql(result))
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Then /^I should get trials where the "([^\"]*)" contains "([^\"]*)"$/ do |field, value|
|
38
|
+
@trials.each do |trial|
|
39
|
+
item_values = []
|
40
|
+
result = trial.send(field)
|
41
|
+
if result.is_a?(Array)
|
42
|
+
found = false
|
43
|
+
result.each do |i|
|
44
|
+
found = true if i.to_s =~ /#{value}/i
|
45
|
+
end
|
46
|
+
debugger if !found
|
47
|
+
found.should be_true
|
48
|
+
else
|
49
|
+
result.to_s.should =~ /#{value}/i
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
Then /^I should get a trial$/ do
|
55
|
+
@trial.should_not be_nil
|
56
|
+
end
|
57
|
+
|
58
|
+
Then /^the trial should have an "([^\"]*)" of "([^\"]*)"$/ do |field, value|
|
59
|
+
@trial.send(field).should eql(value)
|
60
|
+
end
|
61
|
+
|
62
|
+
Then /^I should not get a trial$/ do
|
63
|
+
@trial.should be_nil
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Clinical
|
2
|
+
class Collection < WillPaginate::Collection
|
3
|
+
include HappyMapper
|
4
|
+
attr_accessor :count
|
5
|
+
class << self
|
6
|
+
def create_from_results(page, per_page, body)
|
7
|
+
results = SearchResult.parse(body)
|
8
|
+
col = create(page, per_page, results.count || 0) do |pager|
|
9
|
+
pager.replace(results.trials)
|
10
|
+
end
|
11
|
+
col.count = results.count
|
12
|
+
col
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class SearchResult
|
17
|
+
include HappyMapper
|
18
|
+
tag "search_results"
|
19
|
+
attribute "count", Integer
|
20
|
+
|
21
|
+
has_many :trials, Clinical::Trial
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#thanks Rails Core!
|
2
|
+
module Clinical
|
3
|
+
module Extensions
|
4
|
+
module Array
|
5
|
+
def extract_options!
|
6
|
+
last.is_a?(::Hash) ? pop : {}
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
module String
|
12
|
+
def underscore(camel_cased_word)
|
13
|
+
camel_cased_word.to_s.gsub(/::/, '/').
|
14
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
15
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
16
|
+
tr("-", "_").
|
17
|
+
downcase
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
unless String.instance_methods.include?("underscore")
|
24
|
+
String.send(:include, Clinical::Extensions::String)
|
25
|
+
end
|
26
|
+
unless Array.instance_methods.include?("extract_options!")
|
27
|
+
Array.send(:include, Clinical::Extensions::Array)
|
28
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Clinical
|
2
|
+
class Intervention
|
3
|
+
include HappyMapper
|
4
|
+
|
5
|
+
element :type, String, :tag => "intervention_type"
|
6
|
+
element :description, String
|
7
|
+
element :name, String, :tag => "intervention_name"
|
8
|
+
|
9
|
+
def to_s
|
10
|
+
"#{self.name} (#{self.type}): #{self.description}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Clinical
|
2
|
+
module Outcome
|
3
|
+
|
4
|
+
def self.included(base)
|
5
|
+
base.send(:include, InstanceMethods)
|
6
|
+
base.class_eval do
|
7
|
+
include InstanceMethods
|
8
|
+
include HappyMapper
|
9
|
+
element :measure, String
|
10
|
+
element :time_frame, String
|
11
|
+
element :safety_issue, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module InstanceMethods
|
16
|
+
def primary?
|
17
|
+
self.class.tag_name == "primary_outcome"
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_s
|
21
|
+
val = "#{measure}"
|
22
|
+
val << ", TIME FRAME: #{time_frame}" if time_frame
|
23
|
+
val << ",SAFETY ISSUE: #{safety_issue}" if safety_issue
|
24
|
+
val
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Clinical
|
2
|
+
class Status
|
3
|
+
STATUSES = [
|
4
|
+
:not_yet_recruiting,
|
5
|
+
:recruiting,
|
6
|
+
:enrolling_by_invitation,
|
7
|
+
:active,
|
8
|
+
:not_recruiting,
|
9
|
+
:completed,
|
10
|
+
:suspended,
|
11
|
+
:terminated,
|
12
|
+
:withdrawn,
|
13
|
+
:available,
|
14
|
+
:no_longer_available
|
15
|
+
]
|
16
|
+
|
17
|
+
OPEN_STATUSES = [
|
18
|
+
:not_yet_recruiting,
|
19
|
+
:recruiting
|
20
|
+
]
|
21
|
+
|
22
|
+
attr_reader :name
|
23
|
+
|
24
|
+
def initialize(sym)
|
25
|
+
@name = sym
|
26
|
+
end
|
27
|
+
|
28
|
+
def open?
|
29
|
+
OPEN_STATUSES.include?(name)
|
30
|
+
end
|
31
|
+
|
32
|
+
def to_s
|
33
|
+
sym.to_s
|
34
|
+
end
|
35
|
+
|
36
|
+
class << self
|
37
|
+
def parse(s)
|
38
|
+
s.nil? ? nil : Status.new(s.downcase.gsub(" ", "_").to_sym)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
require "ruby-debug"
|
2
|
+
|
3
|
+
module Clinical
|
4
|
+
class Trial
|
5
|
+
include HappyMapper
|
6
|
+
include HTTParty
|
7
|
+
|
8
|
+
base_uri "http://clinicaltrials.gov"
|
9
|
+
default_params :displayxml => true
|
10
|
+
|
11
|
+
tag "clinical_study"
|
12
|
+
element :nct_id, String, :deep => true
|
13
|
+
element :read_status, Clinical::Status, :tag => "status", :parser => :parse
|
14
|
+
element :overall_status, Clinical::Status, :parser => :parse
|
15
|
+
element :url, String
|
16
|
+
element :short_title, String, :tag => "title"
|
17
|
+
element :official_title, String
|
18
|
+
element :condition_summary, String
|
19
|
+
has_many :condition_items, String, :tag => "condition"
|
20
|
+
|
21
|
+
element :phase, Integer
|
22
|
+
element :study_type, String
|
23
|
+
element :study_design, String
|
24
|
+
|
25
|
+
element :lead_sponsor, String, :tag => "sponsors/lead_sponsor"
|
26
|
+
has_many :collaborators, String, :tag => "sponsors/collaborator"
|
27
|
+
has_many :agencies, String, :tag => "sponsors/agency"
|
28
|
+
|
29
|
+
has_many :interventions, Intervention, :tag => "intervention"
|
30
|
+
has_many :primary_outcomes, PrimaryOutcome
|
31
|
+
has_many :secondary_outcomes, SecondaryOutcome
|
32
|
+
|
33
|
+
has_many :locations, Location, :tag => "location"
|
34
|
+
element :start_date, Date
|
35
|
+
element :end_date, Date
|
36
|
+
|
37
|
+
element :last_changed_at, Date, :tag => "lastchanged_date"
|
38
|
+
|
39
|
+
element :minimum_age, String
|
40
|
+
element :maximum_age, String
|
41
|
+
element :gender, String
|
42
|
+
element :healthy_volunteers, String
|
43
|
+
|
44
|
+
element :participant_quantity, Integer, :tag => "enrollment"
|
45
|
+
|
46
|
+
element :url, String, :tag => "required_header/url"
|
47
|
+
element :eligibility_criteria, String, :tag => "eligibility/criteria/textblock"
|
48
|
+
|
49
|
+
element :brief_summary, String, :tag => "brief_summary/textblock"
|
50
|
+
element :detailed_description, String, :tag => "brief_summary/textblock"
|
51
|
+
|
52
|
+
def id
|
53
|
+
self.nct_id
|
54
|
+
end
|
55
|
+
|
56
|
+
def open?
|
57
|
+
self.status && self.status.open?
|
58
|
+
end
|
59
|
+
|
60
|
+
def sponsors
|
61
|
+
@sponsors ||= [lead_sponsor, (collaborators || []), (agencies || [])].flatten
|
62
|
+
end
|
63
|
+
|
64
|
+
def outcomes
|
65
|
+
@outcomes ||= [primary_outcomes, secondary_outcomes].flatten
|
66
|
+
end
|
67
|
+
|
68
|
+
def status
|
69
|
+
self.read_status || self.overall_status
|
70
|
+
end
|
71
|
+
|
72
|
+
def conditions
|
73
|
+
if condition_items.nil? || condition_items.empty?
|
74
|
+
condition_summary.split(";")
|
75
|
+
else
|
76
|
+
condition_items
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
class << self
|
81
|
+
def find_by_id(id)
|
82
|
+
response = get("/show/#{id}")
|
83
|
+
if response.code == 400
|
84
|
+
nil
|
85
|
+
else
|
86
|
+
begin
|
87
|
+
parse(response.body)
|
88
|
+
rescue LibXML::XML::Error
|
89
|
+
return nil
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def find(*args)
|
95
|
+
options = args.extract_options!
|
96
|
+
|
97
|
+
options[:page] ||= 1
|
98
|
+
options[:per_page] ||= 20
|
99
|
+
|
100
|
+
query = query_hash_for(*[args, options])
|
101
|
+
response = get("/search", :query => query)
|
102
|
+
trials = Collection.create_from_results(options[:page],
|
103
|
+
options[:per_page],
|
104
|
+
response.body)
|
105
|
+
|
106
|
+
if options[:extended]
|
107
|
+
fetch_more_details(trials)
|
108
|
+
else
|
109
|
+
trials
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def query_hash_for(*args)
|
114
|
+
query = {}
|
115
|
+
options = args.extract_options! || {}
|
116
|
+
|
117
|
+
conditions = options[:conditions] || {}
|
118
|
+
query["start"] = (options[:per_page] * options[:page]) - (options[:per_page] - 1)
|
119
|
+
unless conditions[:recruiting].nil?
|
120
|
+
query["recr"] = conditions[:recruiting] ? "open" : "closed"
|
121
|
+
end
|
122
|
+
query["term"] = args.first if args.first.is_a?(String)
|
123
|
+
|
124
|
+
{
|
125
|
+
:condition => "cond",
|
126
|
+
:sponsor => "spons",
|
127
|
+
:intervention => "intr",
|
128
|
+
:outcome => "outc",
|
129
|
+
:sponsor => "spons"
|
130
|
+
}.each do |key,value|
|
131
|
+
query[value] = conditions[key] unless conditions[key].nil?
|
132
|
+
end
|
133
|
+
|
134
|
+
query
|
135
|
+
end
|
136
|
+
|
137
|
+
def extract_options!
|
138
|
+
last.is_a?(Hash) ? pop : { }
|
139
|
+
end
|
140
|
+
|
141
|
+
private
|
142
|
+
def fetch_more_details(trials)
|
143
|
+
detailed_trials = trials.collect {|i| find_by_id(i.id)}
|
144
|
+
Collection.create(trials.current_page, trials.per_page, trials.count || 0) do |pager|
|
145
|
+
pager.replace(detailed_trials)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
data/lib/clinical.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
|
3
|
+
require "will_paginate"
|
4
|
+
require "httparty"
|
5
|
+
require "happymapper"
|
6
|
+
|
7
|
+
require "clinical/extensions"
|
8
|
+
|
9
|
+
require "clinical/status"
|
10
|
+
require "clinical/intervention"
|
11
|
+
require "clinical/outcome"
|
12
|
+
require "clinical/primary_outcome"
|
13
|
+
require "clinical/secondary_outcome"
|
14
|
+
|
15
|
+
require "clinical/address"
|
16
|
+
require "clinical/contact"
|
17
|
+
require "clinical/location"
|
18
|
+
|
19
|
+
require "clinical/trial"
|
20
|
+
|
21
|
+
require "clinical/collection"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class Clinical::TrialTest < Test::Unit::TestCase
|
4
|
+
context "when finding based on a hash of conditions" do
|
5
|
+
setup do
|
6
|
+
register_response("/search?displayxml=true&start=1&recr=open", "open_set")
|
7
|
+
end
|
8
|
+
|
9
|
+
should "return a paginated list of trials" do
|
10
|
+
@trials = Clinical::Trial.find({:conditions => {:recruiting => true}})
|
11
|
+
assert_instance_of Clinical::Collection, @trials
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context "a trial" do
|
16
|
+
setup do
|
17
|
+
@npi_id = "NPI5245"
|
18
|
+
register_response("/show/NPI5245?displayxml=true", "lupus_single")
|
19
|
+
@trial = Clinical::Trial.find_by_id(@npi_id)
|
20
|
+
end
|
21
|
+
|
22
|
+
should "have a status" do
|
23
|
+
assert_not_nil @trial.status
|
24
|
+
end
|
25
|
+
|
26
|
+
should "indicate whether the trial is open" do
|
27
|
+
assert_equal @trial.open?, @trial.status.open?
|
28
|
+
end
|
29
|
+
|
30
|
+
should "have a location" do
|
31
|
+
assert_not_nil @trial.locations
|
32
|
+
assert !@trial.locations.empty?
|
33
|
+
end
|
34
|
+
|
35
|
+
should "have a start date" do
|
36
|
+
assert_not_nil @trial.start_date
|
37
|
+
end
|
38
|
+
|
39
|
+
should "have a location with an address" do
|
40
|
+
assert !@trial.locations[0].address.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
should "have a study type" do
|
44
|
+
assert_not_nil @trial.study_type
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Date: Sat, 27 Jun 2009 19:11:20 GMT
|
3
|
+
Set-Cookie: CTOpts=6ihzm6CLRiWguT0gEyUgzw-R98Ly0RGHhgE; Path=/ct2/
|
4
|
+
Expires: Sat, 27 Jun 2009 19:11:21 GMT
|
5
|
+
Content-Type: text/xml;charset=UTF-8
|
6
|
+
Content-Length: 7971
|
7
|
+
Set-Cookie: BIGipServerctgov-http-pool=290524802.22610.0000; path=/
|
8
|
+
|
9
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
10
|
+
<clinical_study>
|
11
|
+
<required_header>
|
12
|
+
<download_date>Information obtained from ClinicalTrials.gov on June 26, 2009</download_date>
|
13
|
+
<link_text>Link to the current ClinicalTrials.gov record.</link_text>
|
14
|
+
<url>http://clinicaltrials.gov/show/NCT00001372</url>
|
15
|
+
</required_header>
|
16
|
+
<id_info>
|
17
|
+
<org_study_id>940066</org_study_id>
|
18
|
+
<secondary_id>94-AR-0066</secondary_id>
|
19
|
+
<nct_id>NCT00001372</nct_id>
|
20
|
+
</id_info>
|
21
|
+
<brief_title>Study of Systemic Lupus Erythematosus</brief_title>
|
22
|
+
<official_title>Studies of the Pathogenesis and Natural History of Systemic Lupus Erythematosus (SLE)</official_title>
|
23
|
+
<sponsors>
|
24
|
+
<lead_sponsor>
|
25
|
+
<agency>National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS)</agency>
|
26
|
+
</lead_sponsor>
|
27
|
+
</sponsors>
|
28
|
+
<source>National Institutes of Health Clinical Center (CC)</source>
|
29
|
+
<oversight_info>
|
30
|
+
<authority>United States: Federal Government</authority>
|
31
|
+
</oversight_info>
|
32
|
+
<brief_summary>
|
33
|
+
<textblock>
|
34
|
+
This protocol will evaluate patients with systemic lupus erythematosus (SLE) and their
|
35
|
+
relatives to learn more about how the disease develops and changes over time. It will also
|
36
|
+
study genetic factors that make a person susceptible to SLE.
|
37
|
+
|
38
|
+
Patients 10 years of age and older with known or suspected SLE and their relatives may be
|
39
|
+
eligible for this study. Patients will be evaluated with a medical history and physical
|
40
|
+
examination, blood and urine tests. Other procedures may include:
|
41
|
+
|
42
|
+
1. Electrocardiogram
|
43
|
+
|
44
|
+
2. 24-hour urine collection
|
45
|
+
|
46
|
+
3. Imaging studies, such as chest and joint X-rays, magnetic resonance imaging (MRI) scans,
|
47
|
+
bone scans, and bone densitometry.
|
48
|
+
|
49
|
+
4. Questionnaire about the degree of disease activity, and survey of risk factors for
|
50
|
+
disease complications.
|
51
|
+
|
52
|
+
5. Apheresis-Collection of plasma (fluid portion of blood) or blood cells for analysis.
|
53
|
+
Whole blood is collected through a needle in an arm vein. The blood circulates through
|
54
|
+
a machine that separates it into its components. The required component (plasma or
|
55
|
+
cells) is removed and the rest of the blood is returned to the body through the same
|
56
|
+
needle or through a second needle in the other arm.
|
57
|
+
|
58
|
+
6. Skin biopsy-Removal of a small skin sample for microscopic analysis. An area of skin is
|
59
|
+
numbed with an anesthetic and a small circular portion (about 1/4 inch in diameter) is
|
60
|
+
removed, using a sharp cookie cutter-type instrument.
|
61
|
+
|
62
|
+
7. Kidney, bone marrow or other organ biopsy-Removal of a small sample of organ tissue.
|
63
|
+
These biopsies are done only if they can provide information useful in better
|
64
|
+
understanding the disease or making treatment decisions.
|
65
|
+
|
66
|
+
8. Genetic studies-Collection of a blood sample for gene testing.
|
67
|
+
|
68
|
+
Patients will be followed at least once a year with a brief history and physical examination
|
69
|
+
and routine blood and urine tests. Some patients may be seen more often. Treatment
|
70
|
+
recommendations will be offered to patients' physicians, and patients who are eligible for
|
71
|
+
other research treatment studies will be invited to enroll.
|
72
|
+
|
73
|
+
Participating relatives of patients will fill out a brief medical history questionnaire and
|
74
|
+
provide a DNA sample (either a blood sample or tissue swab from the inside of the cheek) for
|
75
|
+
genetic testing.
|
76
|
+
</textblock>
|
77
|
+
</brief_summary>
|
78
|
+
<detailed_description>
|
79
|
+
<textblock>
|
80
|
+
This research protocol will evaluate subjects with systemic lupus erythematosus (SLE) and
|
81
|
+
their relatives to study the pathogenesis and natural history of the disease. Patients will
|
82
|
+
be evaluated by a history and physical examination and routine laboratory studies will be
|
83
|
+
obtained as needed to assess disease activity or complications of the disease and to monitor
|
84
|
+
for drug-related toxicities. Blood, skin or urine specimens may be requested for
|
85
|
+
laboratory-based research investigations. DNA will be isolated from eligible subjects for
|
86
|
+
genetic studies. Patients who are eligible for other research protocols will be offered the
|
87
|
+
opportunity to participate in these studies by signed informed consent. Any medical care
|
88
|
+
recommended or provided to the patient will be consistent with routine standards of practice
|
89
|
+
and provided in consultation with the patient's referring physician.
|
90
|
+
</textblock>
|
91
|
+
</detailed_description>
|
92
|
+
<overall_status>Recruiting</overall_status>
|
93
|
+
<start_date>February 1994</start_date>
|
94
|
+
<phase>N/A</phase>
|
95
|
+
<study_type>Observational</study_type>
|
96
|
+
<study_design>N/A</study_design>
|
97
|
+
<condition>Lupus Nephritis</condition>
|
98
|
+
<condition>Systemic Lupus Erythematosus</condition>
|
99
|
+
<eligibility>
|
100
|
+
<criteria>
|
101
|
+
<textblock>
|
102
|
+
- INCLUSION CRITERIA
|
103
|
+
|
104
|
+
SLE or suspected SLE established by ARA criteria.
|
105
|
+
|
106
|
+
Ability to give informed consent .
|
107
|
+
|
108
|
+
Adult and minor relatives (first and second degree) of individuals included in III-A-1
|
109
|
+
(only for genetic studies) .
|
110
|
+
|
111
|
+
Willingness of the patient's or minor relative's parents to give informed consent (only for
|
112
|
+
genetic studies).
|
113
|
+
|
114
|
+
Adult healthy volunteers (for punch biopsy of the skin and bone marrow biopsy).
|
115
|
+
|
116
|
+
EXCLUSION CRITERIA:
|
117
|
+
|
118
|
+
Concomitant medical problems which would confound the interpretation of studies gathered by
|
119
|
+
this protocol. Included in this is the presence of HIV in the blood if it interferes with
|
120
|
+
interpretation of some lupus studies.
|
121
|
+
|
122
|
+
Concomitant medical, surgical or other conditions for which inadequate facilities are
|
123
|
+
available to support their care at the NIH .
|
124
|
+
</textblock>
|
125
|
+
</criteria>
|
126
|
+
<gender>Both</gender>
|
127
|
+
<minimum_age>N/A</minimum_age>
|
128
|
+
<maximum_age>N/A</maximum_age>
|
129
|
+
<healthy_volunteers>Accepts Healthy Volunteers</healthy_volunteers>
|
130
|
+
</eligibility>
|
131
|
+
<overall_contact>
|
132
|
+
<last_name>Patient Recruitment and Public Liaison Office</last_name>
|
133
|
+
<phone>(800) 411-1222</phone>
|
134
|
+
<email>prpl@mail.cc.nih.gov</email>
|
135
|
+
</overall_contact>
|
136
|
+
<overall_contact_backup>
|
137
|
+
<last_name>TTY</last_name>
|
138
|
+
<phone>1-866-411-1010</phone>
|
139
|
+
</overall_contact_backup>
|
140
|
+
<location>
|
141
|
+
<facility>
|
142
|
+
<name>National Institutes of Health Clinical Center, 9000 Rockville Pike</name>
|
143
|
+
<address>
|
144
|
+
<city>Bethesda</city>
|
145
|
+
<state>Maryland</state>
|
146
|
+
<zip>20892</zip>
|
147
|
+
<country>United States</country>
|
148
|
+
</address>
|
149
|
+
</facility>
|
150
|
+
<status>Recruiting</status>
|
151
|
+
</location>
|
152
|
+
<link>
|
153
|
+
<url>http://clinicalstudies.info.nih.gov/detail/A_1994-AR-0066.html</url>
|
154
|
+
<description>NIH Clinical Center Detailed Web Page</description>
|
155
|
+
</link>
|
156
|
+
<reference>
|
157
|
+
<citation>Boumpas DT, Fessler BJ, Austin HA 3rd, Balow JE, Klippel JH, Lockshin MD. Systemic lupus erythematosus: emerging concepts. Part 2: Dermatologic and joint disease, the antiphospholipid antibody syndrome, pregnancy and hormonal therapy, morbidity and mortality, and pathogenesis. Ann Intern Med. 1995 Jul 1;123(1):42-53. Review.</citation>
|
158
|
+
<PMID>7762914</PMID>
|
159
|
+
</reference>
|
160
|
+
<reference>
|
161
|
+
<citation>Emlen W, Niebur J, Kadera R. Accelerated in vitro apoptosis of lymphocytes from patients with systemic lupus erythematosus. J Immunol. 1994 Apr 1;152(7):3685-92.</citation>
|
162
|
+
<PMID>8144943</PMID>
|
163
|
+
</reference>
|
164
|
+
<reference>
|
165
|
+
<citation>Casciola-Rosen LA, Anhalt G, Rosen A. Autoantigens targeted in systemic lupus erythematosus are clustered in two populations of surface structures on apoptotic keratinocytes. J Exp Med. 1994 Apr 1;179(4):1317-30.</citation>
|
166
|
+
<PMID>7511686</PMID>
|
167
|
+
</reference>
|
168
|
+
<verification_date>October 2008</verification_date>
|
169
|
+
<lastchanged_date>November 25, 2008</lastchanged_date>
|
170
|
+
<firstreceived_date>November 3, 1999</firstreceived_date>
|
171
|
+
</clinical_study>
|
@@ -0,0 +1,212 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Date: Fri, 26 Jun 2009 21:40:41 GMT
|
3
|
+
Set-Cookie: CTOpts=6ihzm6CLRiFiQRcyCyUgzw-R98LyNR4i-CE; Path=/ct2/
|
4
|
+
Expires: Fri, 26 Jun 2009 21:40:42 GMT
|
5
|
+
Content-Type: text/xml;charset=UTF-8
|
6
|
+
Content-Length: 9221
|
7
|
+
Set-Cookie: BIGipServerctgov-http-pool=189861506.22610.0000; path=/
|
8
|
+
|
9
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
10
|
+
<search_results count="28928">
|
11
|
+
<query>( "Recruiting" OR "Not yet recruiting" OR "Available" ) [SUMMARY-STATUS]</query>
|
12
|
+
<clinical_study>
|
13
|
+
<order>1</order>
|
14
|
+
<score>0.9801</score>
|
15
|
+
<nct_id>NCT00004400</nct_id>
|
16
|
+
<url>http://ClinicalTrials.gov/show/NCT00004400</url>
|
17
|
+
<title>Phase II Randomized Study of Physiologic Testosterone Replacement in Premenopausal, HIV-Positive Women</title>
|
18
|
+
<status open="Y">Recruiting</status>
|
19
|
+
<condition_summary>HIV Infections; Cachexia</condition_summary>
|
20
|
+
<last_changed>June 23, 2005</last_changed>
|
21
|
+
</clinical_study>
|
22
|
+
<clinical_study>
|
23
|
+
<order>2</order>
|
24
|
+
<score>0.9801</score>
|
25
|
+
<nct_id>NCT00005100</nct_id>
|
26
|
+
<url>http://ClinicalTrials.gov/show/NCT00005100</url>
|
27
|
+
<title>Measurement of Outcome of Surgical Treatment in Patients With Acromegaly</title>
|
28
|
+
<status open="Y">Recruiting</status>
|
29
|
+
<condition_summary>Acromegaly</condition_summary>
|
30
|
+
<last_changed>June 23, 2005</last_changed>
|
31
|
+
</clinical_study>
|
32
|
+
<clinical_study>
|
33
|
+
<order>3</order>
|
34
|
+
<score>0.9801</score>
|
35
|
+
<nct_id>NCT00011700</nct_id>
|
36
|
+
<url>http://ClinicalTrials.gov/show/NCT00011700</url>
|
37
|
+
<title>Stachybotrys Induced Hemorrhage in the Developing Lung</title>
|
38
|
+
<status open="Y">Recruiting</status>
|
39
|
+
<condition_summary>Idiopathic Pulmonary Hemorrhage</condition_summary>
|
40
|
+
<last_changed>December 1, 2006</last_changed>
|
41
|
+
</clinical_study>
|
42
|
+
<clinical_study>
|
43
|
+
<order>4</order>
|
44
|
+
<score>0.9801</score>
|
45
|
+
<nct_id>NCT00041600</nct_id>
|
46
|
+
<url>http://ClinicalTrials.gov/show/NCT00041600</url>
|
47
|
+
<title>Human Epilepsy Genetics--Neuronal Migration Disorders Study</title>
|
48
|
+
<status open="Y">Recruiting</status>
|
49
|
+
<condition_summary>Epilepsy; Seizures; Cognition Disorders; Neuronal Migration Disorders</condition_summary>
|
50
|
+
<last_changed>February 3, 2009</last_changed>
|
51
|
+
</clinical_study>
|
52
|
+
<clinical_study>
|
53
|
+
<order>5</order>
|
54
|
+
<score>0.9801</score>
|
55
|
+
<nct_id>NCT00044200</nct_id>
|
56
|
+
<url>http://ClinicalTrials.gov/show/NCT00044200</url>
|
57
|
+
<title>Positron Emission Tomography (PET) to Study Brain Signaling</title>
|
58
|
+
<status open="Y">Recruiting</status>
|
59
|
+
<condition_summary>Healthy</condition_summary>
|
60
|
+
<last_changed>June 9, 2009</last_changed>
|
61
|
+
</clinical_study>
|
62
|
+
<clinical_study>
|
63
|
+
<order>6</order>
|
64
|
+
<score>0.9801</score>
|
65
|
+
<nct_id>NCT00050700</nct_id>
|
66
|
+
<url>http://ClinicalTrials.gov/show/NCT00050700</url>
|
67
|
+
<title>Brain Imaging in Depression</title>
|
68
|
+
<status open="Y">Recruiting</status>
|
69
|
+
<condition_summary>Depression; Bipolar Disorder</condition_summary>
|
70
|
+
<last_changed>June 9, 2009</last_changed>
|
71
|
+
</clinical_study>
|
72
|
+
<clinical_study>
|
73
|
+
<order>7</order>
|
74
|
+
<score>0.9801</score>
|
75
|
+
<nct_id>NCT00062400</nct_id>
|
76
|
+
<url>http://ClinicalTrials.gov/show/NCT00062400</url>
|
77
|
+
<title>Assessing Women's Attitudes About the Risk of Infertility Related to Adjuvant Therapy for Early Breast Cancer</title>
|
78
|
+
<status open="Y">Recruiting</status>
|
79
|
+
<condition_summary>Breast Cancer; Psychosocial Effects/Treatment; Sexual Dysfunction and Infertility; Sexuality and Reproductive Issues</condition_summary>
|
80
|
+
<last_changed>June 16, 2009</last_changed>
|
81
|
+
</clinical_study>
|
82
|
+
<clinical_study>
|
83
|
+
<order>8</order>
|
84
|
+
<score>0.9801</score>
|
85
|
+
<nct_id>NCT00083200</nct_id>
|
86
|
+
<url>http://ClinicalTrials.gov/show/NCT00083200</url>
|
87
|
+
<title>Two Dose Levels of Capecitabine With Docetaxel in Treating Women With Locally Advanced or Metastatic Breast Cancer That Has Not Responded to Previous Anthracycline-Based Chemotherapy</title>
|
88
|
+
<status open="Y">Recruiting</status>
|
89
|
+
<condition_summary>Breast Cancer</condition_summary>
|
90
|
+
<last_changed>February 26, 2009</last_changed>
|
91
|
+
</clinical_study>
|
92
|
+
<clinical_study>
|
93
|
+
<order>9</order>
|
94
|
+
<score>0.9801</score>
|
95
|
+
<nct_id>NCT00096200</nct_id>
|
96
|
+
<url>http://ClinicalTrials.gov/show/NCT00096200</url>
|
97
|
+
<title>Sorafenib With or Without Paclitaxel and Carboplatin in Treating Patients With Recurrent Ovarian Cancer, Primary Peritoneal Cancer, or Fallopian Tube Cancer</title>
|
98
|
+
<status open="Y">Recruiting</status>
|
99
|
+
<condition_summary>Fallopian Tube Cancer; Ovarian Cancer; Peritoneal Cavity Cancer</condition_summary>
|
100
|
+
<last_changed>May 5, 2009</last_changed>
|
101
|
+
</clinical_study>
|
102
|
+
<clinical_study>
|
103
|
+
<order>10</order>
|
104
|
+
<score>0.9801</score>
|
105
|
+
<nct_id>NCT00115700</nct_id>
|
106
|
+
<url>http://ClinicalTrials.gov/show/NCT00115700</url>
|
107
|
+
<title>Radiotherapy Versus Radiotherapy Plus Chemotherapy in Early Stage Follicular Lymphoma</title>
|
108
|
+
<status open="Y">Recruiting</status>
|
109
|
+
<condition_summary>Follicular Lymphoma</condition_summary>
|
110
|
+
<last_changed>May 6, 2009</last_changed>
|
111
|
+
</clinical_study>
|
112
|
+
<clinical_study>
|
113
|
+
<order>11</order>
|
114
|
+
<score>0.9801</score>
|
115
|
+
<nct_id>NCT00124800</nct_id>
|
116
|
+
<url>http://ClinicalTrials.gov/show/NCT00124800</url>
|
117
|
+
<title>The Effect of Tinnitus Retraining Therapy on Subjective and Objective Measures of Chronic Tinnitus</title>
|
118
|
+
<status open="Y">Recruiting</status>
|
119
|
+
<condition_summary>Tinnitus</condition_summary>
|
120
|
+
<last_changed>February 10, 2009</last_changed>
|
121
|
+
</clinical_study>
|
122
|
+
<clinical_study>
|
123
|
+
<order>12</order>
|
124
|
+
<score>0.9801</score>
|
125
|
+
<nct_id>NCT00136500</nct_id>
|
126
|
+
<url>http://ClinicalTrials.gov/show/NCT00136500</url>
|
127
|
+
<title>Familial Amyotrophic Lateral Sclerosis (FALS) Study</title>
|
128
|
+
<status open="Y">Recruiting</status>
|
129
|
+
<condition_summary>Amyotrophic Lateral Sclerosis</condition_summary>
|
130
|
+
<last_changed>February 16, 2009</last_changed>
|
131
|
+
</clinical_study>
|
132
|
+
<clinical_study>
|
133
|
+
<order>13</order>
|
134
|
+
<score>0.9801</score>
|
135
|
+
<nct_id>NCT00135200</nct_id>
|
136
|
+
<url>http://ClinicalTrials.gov/show/NCT00135200</url>
|
137
|
+
<title>Clinical Trial of Consolidation Treatment With Iodine I 131 Tositumomab for Multiple Myeloma</title>
|
138
|
+
<status open="Y">Recruiting</status>
|
139
|
+
<condition_summary>Multiple Myeloma</condition_summary>
|
140
|
+
<last_changed>March 7, 2009</last_changed>
|
141
|
+
</clinical_study>
|
142
|
+
<clinical_study>
|
143
|
+
<order>14</order>
|
144
|
+
<score>0.9801</score>
|
145
|
+
<nct_id>NCT00153400</nct_id>
|
146
|
+
<url>http://ClinicalTrials.gov/show/NCT00153400</url>
|
147
|
+
<title>California WISEWOMAN Project</title>
|
148
|
+
<status open="Y">Not yet recruiting</status>
|
149
|
+
<condition_summary>Cardiovascular Diseases; Chronic Diseases</condition_summary>
|
150
|
+
<last_changed>February 10, 2006</last_changed>
|
151
|
+
</clinical_study>
|
152
|
+
<clinical_study>
|
153
|
+
<order>15</order>
|
154
|
+
<score>0.9801</score>
|
155
|
+
<nct_id>NCT00157300</nct_id>
|
156
|
+
<url>http://ClinicalTrials.gov/show/NCT00157300</url>
|
157
|
+
<title>PROTECT: Prospective Trial on Erythropoietin in Clinical Transplantation</title>
|
158
|
+
<status open="Y">Recruiting</status>
|
159
|
+
<condition_summary>Patients Receiving a Kidney From a Non-Heart-Beating Donor</condition_summary>
|
160
|
+
<last_changed>September 19, 2007</last_changed>
|
161
|
+
</clinical_study>
|
162
|
+
<clinical_study>
|
163
|
+
<order>16</order>
|
164
|
+
<score>0.9801</score>
|
165
|
+
<nct_id>NCT00162500</nct_id>
|
166
|
+
<url>http://ClinicalTrials.gov/show/NCT00162500</url>
|
167
|
+
<title>A Novel Vaccine for the Treatment of MUC1-Expressing Tumor Malignancies</title>
|
168
|
+
<status open="Y">Not yet recruiting</status>
|
169
|
+
<condition_summary>Multiple Myeloma; Tumors</condition_summary>
|
170
|
+
<last_changed>January 9, 2007</last_changed>
|
171
|
+
</clinical_study>
|
172
|
+
<clinical_study>
|
173
|
+
<order>17</order>
|
174
|
+
<score>0.9801</score>
|
175
|
+
<nct_id>NCT00172900</nct_id>
|
176
|
+
<url>http://ClinicalTrials.gov/show/NCT00172900</url>
|
177
|
+
<title>MRS and DTI of White Matter in Alzheimer's Disease</title>
|
178
|
+
<status open="Y">Recruiting</status>
|
179
|
+
<condition_summary>Alzheimer's Disease; Vascular Dementia</condition_summary>
|
180
|
+
<last_changed>December 20, 2005</last_changed>
|
181
|
+
</clinical_study>
|
182
|
+
<clinical_study>
|
183
|
+
<order>18</order>
|
184
|
+
<score>0.9801</score>
|
185
|
+
<nct_id>NCT00167700</nct_id>
|
186
|
+
<url>http://ClinicalTrials.gov/show/NCT00167700</url>
|
187
|
+
<title>The Effects of Maternal Nutrition During Pregnancy and Breast Feeding on the Risk of Allergic Disease in Child</title>
|
188
|
+
<status open="Y">Recruiting</status>
|
189
|
+
<condition_summary>Atopic Eczema; Rhinitis; Asthma</condition_summary>
|
190
|
+
<last_changed>June 9, 2008</last_changed>
|
191
|
+
</clinical_study>
|
192
|
+
<clinical_study>
|
193
|
+
<order>19</order>
|
194
|
+
<score>0.9801</score>
|
195
|
+
<nct_id>NCT00179400</nct_id>
|
196
|
+
<url>http://ClinicalTrials.gov/show/NCT00179400</url>
|
197
|
+
<title>Insulin Action in Individuals With Type 2 Diabetes by Natural Fatty Acids or the Medication Pioglitazone</title>
|
198
|
+
<status open="Y">Recruiting</status>
|
199
|
+
<condition_summary>Type 2 Diabetes Mellitus</condition_summary>
|
200
|
+
<last_changed>September 13, 2005</last_changed>
|
201
|
+
</clinical_study>
|
202
|
+
<clinical_study>
|
203
|
+
<order>20</order>
|
204
|
+
<score>0.9801</score>
|
205
|
+
<nct_id>NCT00182000</nct_id>
|
206
|
+
<url>http://ClinicalTrials.gov/show/NCT00182000</url>
|
207
|
+
<title>Effectiveness of D-Cycloserine as an Aid to Enhance Learning for Individuals With OCD Receiving Behavior Therapy</title>
|
208
|
+
<status open="Y">Recruiting</status>
|
209
|
+
<condition_summary>Obsessive-Compulsive Disorder</condition_summary>
|
210
|
+
<last_changed>September 7, 2007</last_changed>
|
211
|
+
</clinical_study>
|
212
|
+
</search_results>
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'shoulda'
|
4
|
+
require 'fakeweb'
|
5
|
+
|
6
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
7
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
8
|
+
require 'clinical'
|
9
|
+
|
10
|
+
begin require "redgreen" rescue Exceptions; end
|
11
|
+
|
12
|
+
FakeWeb.allow_net_connect = false
|
13
|
+
|
14
|
+
class Test::Unit::TestCase
|
15
|
+
def register_response(path, fixture)
|
16
|
+
FakeWeb.register_uri("http://clinicaltrials.gov:80#{path}",
|
17
|
+
:response => xml_fixture_path(fixture))
|
18
|
+
end
|
19
|
+
|
20
|
+
def xml_fixture_path(fixture)
|
21
|
+
File.join(File.dirname(__FILE__), "fixtures", "#{fixture}.xml")
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dpickett-clinical
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Pickett
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-06-28 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: jnunemaker-httparty
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.4.3
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: jnunemaker-happymapper
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.5
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: mislav-will_paginate
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.3.11
|
44
|
+
version:
|
45
|
+
description:
|
46
|
+
email: dpickett@enlightsolutions.com
|
47
|
+
executables: []
|
48
|
+
|
49
|
+
extensions: []
|
50
|
+
|
51
|
+
extra_rdoc_files:
|
52
|
+
- LICENSE
|
53
|
+
- README.rdoc
|
54
|
+
files:
|
55
|
+
- .document
|
56
|
+
- .gitignore
|
57
|
+
- LICENSE
|
58
|
+
- README.rdoc
|
59
|
+
- Rakefile
|
60
|
+
- VERSION
|
61
|
+
- clinical.gemspec
|
62
|
+
- features/finding_clinical_trials.feature
|
63
|
+
- features/step_definitions/clinical_steps.rb
|
64
|
+
- features/support/env.rb
|
65
|
+
- lib/clinical.rb
|
66
|
+
- lib/clinical/collection.rb
|
67
|
+
- lib/clinical/extensions.rb
|
68
|
+
- lib/clinical/intervention.rb
|
69
|
+
- lib/clinical/outcome.rb
|
70
|
+
- lib/clinical/primary_outcome.rb
|
71
|
+
- lib/clinical/secondary_outcome.rb
|
72
|
+
- lib/clinical/status.rb
|
73
|
+
- lib/clinical/trial.rb
|
74
|
+
- test/clinical/trial_test.rb
|
75
|
+
- test/fixtures/lupus_single.xml
|
76
|
+
- test/fixtures/open_set.xml
|
77
|
+
- test/test_helper.rb
|
78
|
+
has_rdoc: true
|
79
|
+
homepage: http://github.com/dpickett/clinical
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options:
|
82
|
+
- --charset=UTF-8
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
version:
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: "0"
|
96
|
+
version:
|
97
|
+
requirements: []
|
98
|
+
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 1.2.0
|
101
|
+
signing_key:
|
102
|
+
specification_version: 3
|
103
|
+
summary: a library for accessing data from ClinicalTrials.gov
|
104
|
+
test_files:
|
105
|
+
- test/clinical/trial_test.rb
|
106
|
+
- test/test_helper.rb
|