clinical 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/clinical.gemspec +4 -2
- data/features/finding_clinical_trials.feature +1 -0
- data/features/step_definitions/clinical_steps.rb +1 -1
- data/lib/clinical/contact.rb +21 -9
- data/lib/clinical/location.rb +1 -1
- data/lib/clinical/location_contact.rb +7 -0
- data/lib/clinical/overall_official.rb +6 -0
- data/lib/clinical/sponsor.rb +8 -8
- data/lib/clinical/trial.rb +2 -0
- data/lib/clinical.rb +4 -1
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/clinical.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{clinical}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Dan Pickett"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-29}
|
10
10
|
s.email = %q{dpickett@enlightsolutions.com}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
@@ -35,7 +35,9 @@ Gem::Specification.new do |s|
|
|
35
35
|
"lib/clinical/intervention.rb",
|
36
36
|
"lib/clinical/lead_sponsor.rb",
|
37
37
|
"lib/clinical/location.rb",
|
38
|
+
"lib/clinical/location_contact.rb",
|
38
39
|
"lib/clinical/outcome.rb",
|
40
|
+
"lib/clinical/overall_official.rb",
|
39
41
|
"lib/clinical/primary_outcome.rb",
|
40
42
|
"lib/clinical/secondary_outcome.rb",
|
41
43
|
"lib/clinical/sponsor.rb",
|
@@ -44,6 +44,7 @@ Feature: As a potential participant for a clinical study
|
|
44
44
|
And the trial should have "conditions" like "Lung Cancer"
|
45
45
|
And the trial should have a "minimum_age" of "21 Years"
|
46
46
|
And the trial should have "sponsors" like "M.D. Anderson"
|
47
|
+
And the trial should have an "overall_official" like "Alexandra Phan, MD"
|
47
48
|
|
48
49
|
Scenario: Find a non-existant trial
|
49
50
|
When I attempt to retrieve trial "4325785"
|
@@ -63,7 +63,7 @@ Then /^the trial should have an? "([^\"]*)" of "([^\"]*)"$/ do |field, value|
|
|
63
63
|
@trial.send(field).to_s.should eql(value)
|
64
64
|
end
|
65
65
|
|
66
|
-
Then /^the trial should have "([^\"]*)" like "([^\"]*)"$/ do |field, value|
|
66
|
+
Then /^the trial should have (an\s)?"([^\"]*)" like "([^\"]*)"$/ do |an, field, value|
|
67
67
|
@trial.send(field).to_s.should =~ /#{Regexp.escape(value)}/
|
68
68
|
end
|
69
69
|
|
data/lib/clinical/contact.rb
CHANGED
@@ -1,13 +1,25 @@
|
|
1
1
|
module Clinical
|
2
|
-
|
3
|
-
|
2
|
+
module Contact
|
3
|
+
def self.included(base)
|
4
|
+
base.class_eval do
|
5
|
+
include HappyMapper
|
6
|
+
include Clinical::Contact::InstanceMethods
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
element :first_name, String
|
9
|
+
element :middle_name, String
|
10
|
+
element :last_name, String
|
11
|
+
element :degrees, String
|
12
|
+
element :phone, String
|
13
|
+
element :phone_extension, String, :tag => "phone_ext"
|
14
|
+
element :email, String
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
module InstanceMethods
|
20
|
+
def to_s
|
21
|
+
[first_name, last_name, "(#{phone})"].join(" ")
|
22
|
+
end
|
23
|
+
end
|
12
24
|
end
|
13
25
|
end
|
data/lib/clinical/location.rb
CHANGED
data/lib/clinical/sponsor.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module Clinical
|
2
2
|
module Sponsor
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
8
|
-
base.extend(ClassMethods)
|
9
|
-
base.send(:include, InstanceMethods)
|
3
|
+
def self.included(base)
|
4
|
+
base.class_eval do
|
5
|
+
attr_accessor :name
|
6
|
+
include HappyMapper
|
10
7
|
end
|
8
|
+
base.extend(ClassMethods)
|
9
|
+
base.send(:include, InstanceMethods)
|
10
|
+
end
|
11
11
|
|
12
12
|
module InstanceMethods
|
13
13
|
def to_s
|
@@ -24,4 +24,4 @@ module Clinical
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
27
|
-
end
|
27
|
+
end
|
data/lib/clinical/trial.rb
CHANGED
@@ -24,6 +24,8 @@ module Clinical
|
|
24
24
|
has_many :collaborators, Clinical::Collaborator
|
25
25
|
has_many :agencies, Clinical::Agency
|
26
26
|
|
27
|
+
has_one :overall_official, Clinical::OverallOfficial, :tag => "overall_official"
|
28
|
+
|
27
29
|
has_many :interventions, Intervention, :tag => "intervention"
|
28
30
|
has_many :primary_outcomes, PrimaryOutcome
|
29
31
|
has_many :secondary_outcomes, SecondaryOutcome
|
data/lib/clinical.rb
CHANGED
@@ -20,8 +20,11 @@ require "clinical/lead_sponsor"
|
|
20
20
|
require "clinical/agency"
|
21
21
|
require "clinical/collaborator"
|
22
22
|
|
23
|
-
require "clinical/address"
|
24
23
|
require "clinical/contact"
|
24
|
+
require "clinical/overall_official"
|
25
|
+
require "clinical/location_contact"
|
26
|
+
|
27
|
+
require "clinical/address"
|
25
28
|
require "clinical/location"
|
26
29
|
|
27
30
|
require "clinical/trial"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clinical
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Pickett
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-29 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -84,7 +84,9 @@ files:
|
|
84
84
|
- lib/clinical/intervention.rb
|
85
85
|
- lib/clinical/lead_sponsor.rb
|
86
86
|
- lib/clinical/location.rb
|
87
|
+
- lib/clinical/location_contact.rb
|
87
88
|
- lib/clinical/outcome.rb
|
89
|
+
- lib/clinical/overall_official.rb
|
88
90
|
- lib/clinical/primary_outcome.rb
|
89
91
|
- lib/clinical/secondary_outcome.rb
|
90
92
|
- lib/clinical/sponsor.rb
|