pharmaobservatory 0.1.23 → 0.1.24
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.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/docs/ConditionSiteCoverageResponse.md +58 -0
- data/docs/ConditionSiteCoverageRow.md +24 -0
- data/docs/ConditionSiteYearsResponse.md +58 -0
- data/docs/ConditionSiteYearsRow.md +36 -0
- data/docs/ConditionsApi.md +160 -0
- data/docs/RwdInstitutionsRow.md +3 -3
- data/docs/RwdNetworksRow.md +1 -1
- data/lib/pharmaobservatory/api/conditions_api.rb +168 -0
- data/lib/pharmaobservatory/models/condition_site_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_site_coverage_row.rb +256 -0
- data/lib/pharmaobservatory/models/condition_site_years_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_site_years_row.rb +322 -0
- data/lib/pharmaobservatory/models/rwd_institutions_row.rb +3 -3
- data/lib/pharmaobservatory/models/rwd_networks_row.rb +1 -1
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +4 -0
- metadata +10 -2
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pharma Observatory Public REST API
|
|
3
|
+
|
|
4
|
+
#Read-only REST API over the Pharma Observatory biomedical data platform. Reference: https://pharmaobservatory.com/api-reference
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PharmaObservatory
|
|
17
|
+
# One row of the condition_site_years dataset: one row per condition, site and trial start year. A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class ConditionSiteYearsRow
|
|
19
|
+
# The condition key, a MeSH (Medical Subject Headings) descriptor id (D followed by six to nine digits).
|
|
20
|
+
attr_accessor :condition_id
|
|
21
|
+
|
|
22
|
+
# The site key (a normalized facility, city and country).
|
|
23
|
+
attr_accessor :site_id
|
|
24
|
+
|
|
25
|
+
# Year the trials started. Null for a trial with no start date.
|
|
26
|
+
attr_accessor :start_year
|
|
27
|
+
|
|
28
|
+
# The facility name as the registry lists it.
|
|
29
|
+
attr_accessor :site_name
|
|
30
|
+
|
|
31
|
+
# City as listed.
|
|
32
|
+
attr_accessor :city
|
|
33
|
+
|
|
34
|
+
# State or province as listed.
|
|
35
|
+
attr_accessor :state
|
|
36
|
+
|
|
37
|
+
# Country as listed.
|
|
38
|
+
attr_accessor :country
|
|
39
|
+
|
|
40
|
+
# Latitude of the finest coordinate the site record has.
|
|
41
|
+
attr_accessor :latitude
|
|
42
|
+
|
|
43
|
+
# Longitude of the finest coordinate the site record has.
|
|
44
|
+
attr_accessor :longitude
|
|
45
|
+
|
|
46
|
+
# Trials of the condition that started that year and list the site.
|
|
47
|
+
attr_accessor :n_trials
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'condition_id' => :'condition_id',
|
|
53
|
+
:'site_id' => :'site_id',
|
|
54
|
+
:'start_year' => :'start_year',
|
|
55
|
+
:'site_name' => :'site_name',
|
|
56
|
+
:'city' => :'city',
|
|
57
|
+
:'state' => :'state',
|
|
58
|
+
:'country' => :'country',
|
|
59
|
+
:'latitude' => :'latitude',
|
|
60
|
+
:'longitude' => :'longitude',
|
|
61
|
+
:'n_trials' => :'n_trials'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns attribute mapping this model knows about
|
|
66
|
+
def self.acceptable_attribute_map
|
|
67
|
+
attribute_map
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns all the JSON keys this model knows about
|
|
71
|
+
def self.acceptable_attributes
|
|
72
|
+
acceptable_attribute_map.values
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Attribute type mapping.
|
|
76
|
+
def self.openapi_types
|
|
77
|
+
{
|
|
78
|
+
:'condition_id' => :'String',
|
|
79
|
+
:'site_id' => :'String',
|
|
80
|
+
:'start_year' => :'Integer',
|
|
81
|
+
:'site_name' => :'String',
|
|
82
|
+
:'city' => :'String',
|
|
83
|
+
:'state' => :'String',
|
|
84
|
+
:'country' => :'String',
|
|
85
|
+
:'latitude' => :'Float',
|
|
86
|
+
:'longitude' => :'Float',
|
|
87
|
+
:'n_trials' => :'Integer'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
:'condition_id',
|
|
95
|
+
:'site_id',
|
|
96
|
+
:'start_year',
|
|
97
|
+
:'site_name',
|
|
98
|
+
:'city',
|
|
99
|
+
:'state',
|
|
100
|
+
:'country',
|
|
101
|
+
:'latitude',
|
|
102
|
+
:'longitude',
|
|
103
|
+
:'n_trials'
|
|
104
|
+
])
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
def initialize(attributes = {})
|
|
110
|
+
if (!attributes.is_a?(Hash))
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ConditionSiteYearsRow` initialize method"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::ConditionSiteYearsRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
119
|
+
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'condition_id')
|
|
124
|
+
self.condition_id = attributes[:'condition_id']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'site_id')
|
|
128
|
+
self.site_id = attributes[:'site_id']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'start_year')
|
|
132
|
+
self.start_year = attributes[:'start_year']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'site_name')
|
|
136
|
+
self.site_name = attributes[:'site_name']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'city')
|
|
140
|
+
self.city = attributes[:'city']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'state')
|
|
144
|
+
self.state = attributes[:'state']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'country')
|
|
148
|
+
self.country = attributes[:'country']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'latitude')
|
|
152
|
+
self.latitude = attributes[:'latitude']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'longitude')
|
|
156
|
+
self.longitude = attributes[:'longitude']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'n_trials')
|
|
160
|
+
self.n_trials = attributes[:'n_trials']
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
165
|
+
# @return Array for valid properties with the reasons
|
|
166
|
+
def list_invalid_properties
|
|
167
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
168
|
+
invalid_properties = Array.new
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
176
|
+
true
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Checks equality by comparing each attribute.
|
|
180
|
+
# @param [Object] Object to be compared
|
|
181
|
+
def ==(o)
|
|
182
|
+
return true if self.equal?(o)
|
|
183
|
+
self.class == o.class &&
|
|
184
|
+
condition_id == o.condition_id &&
|
|
185
|
+
site_id == o.site_id &&
|
|
186
|
+
start_year == o.start_year &&
|
|
187
|
+
site_name == o.site_name &&
|
|
188
|
+
city == o.city &&
|
|
189
|
+
state == o.state &&
|
|
190
|
+
country == o.country &&
|
|
191
|
+
latitude == o.latitude &&
|
|
192
|
+
longitude == o.longitude &&
|
|
193
|
+
n_trials == o.n_trials
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# @see the `==` method
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def eql?(o)
|
|
199
|
+
self == o
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Calculates hash code according to all attributes.
|
|
203
|
+
# @return [Integer] Hash code
|
|
204
|
+
def hash
|
|
205
|
+
[condition_id, site_id, start_year, site_name, city, state, country, latitude, longitude, n_trials].hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Builds the object from hash
|
|
209
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
210
|
+
# @return [Object] Returns the model itself
|
|
211
|
+
def self.build_from_hash(attributes)
|
|
212
|
+
return nil unless attributes.is_a?(Hash)
|
|
213
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
214
|
+
transformed_hash = {}
|
|
215
|
+
openapi_types.each_pair do |key, type|
|
|
216
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
217
|
+
transformed_hash["#{key}"] = nil
|
|
218
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
219
|
+
# check to ensure the input is an array given that the attribute
|
|
220
|
+
# is documented as an array but the input is not
|
|
221
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
222
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
223
|
+
end
|
|
224
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
225
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
new(transformed_hash)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Deserializes the data based on type
|
|
232
|
+
# @param string type Data type
|
|
233
|
+
# @param string value Value to be deserialized
|
|
234
|
+
# @return [Object] Deserialized data
|
|
235
|
+
def self._deserialize(type, value)
|
|
236
|
+
case type.to_sym
|
|
237
|
+
when :Time
|
|
238
|
+
Time.parse(value)
|
|
239
|
+
when :Date
|
|
240
|
+
Date.parse(value)
|
|
241
|
+
when :String
|
|
242
|
+
value.to_s
|
|
243
|
+
when :Integer
|
|
244
|
+
value.to_i
|
|
245
|
+
when :Float
|
|
246
|
+
value.to_f
|
|
247
|
+
when :Boolean
|
|
248
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
249
|
+
true
|
|
250
|
+
else
|
|
251
|
+
false
|
|
252
|
+
end
|
|
253
|
+
when :Object
|
|
254
|
+
# generic object (usually a Hash), return directly
|
|
255
|
+
value
|
|
256
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
257
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
258
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
259
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
260
|
+
k_type = Regexp.last_match[:k_type]
|
|
261
|
+
v_type = Regexp.last_match[:v_type]
|
|
262
|
+
{}.tap do |hash|
|
|
263
|
+
value.each do |k, v|
|
|
264
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
else # model
|
|
268
|
+
# models (e.g. Pet) or oneOf
|
|
269
|
+
klass = PharmaObservatory.const_get(type)
|
|
270
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Returns the string representation of the object
|
|
275
|
+
# @return [String] String presentation of the object
|
|
276
|
+
def to_s
|
|
277
|
+
to_hash.to_s
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
281
|
+
# @return [Hash] Returns the object in the form of hash
|
|
282
|
+
def to_body
|
|
283
|
+
to_hash
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Returns the object in the form of hash
|
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
|
288
|
+
def to_hash
|
|
289
|
+
hash = {}
|
|
290
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
291
|
+
value = self.send(attr)
|
|
292
|
+
if value.nil?
|
|
293
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
294
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
hash[param] = _to_hash(value)
|
|
298
|
+
end
|
|
299
|
+
hash
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Outputs non-array value in the form of hash
|
|
303
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
304
|
+
# @param [Object] value Any valid value
|
|
305
|
+
# @return [Hash] Returns the value in the form of hash
|
|
306
|
+
def _to_hash(value)
|
|
307
|
+
if value.is_a?(Array)
|
|
308
|
+
value.compact.map { |v| _to_hash(v) }
|
|
309
|
+
elsif value.is_a?(Hash)
|
|
310
|
+
{}.tap do |hash|
|
|
311
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
312
|
+
end
|
|
313
|
+
elsif value.respond_to? :to_hash
|
|
314
|
+
value.to_hash
|
|
315
|
+
else
|
|
316
|
+
value
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
end
|
|
@@ -97,13 +97,13 @@ module PharmaObservatory
|
|
|
97
97
|
# The address of this entry on the HMA-EMA catalogue site (the register's URL LINK).
|
|
98
98
|
attr_accessor :catalogue_url
|
|
99
99
|
|
|
100
|
-
#
|
|
100
|
+
# The register export's Yes or No to whether the institution is open to industry-funded research. The export cannot tell an unanswered question from No, so a false is register export: No, not a decline. Null on a catalogue name entry, where the export writes a default No that is not an answer.
|
|
101
101
|
attr_accessor :open_to_industry_funded_research
|
|
102
102
|
|
|
103
|
-
#
|
|
103
|
+
# The register export's Yes or No to whether the institution collects data directly from patients. The export cannot tell an unanswered question from No, so a false is register export: No. Null on a catalogue name entry.
|
|
104
104
|
attr_accessor :collects_data_directly_from_patients
|
|
105
105
|
|
|
106
|
-
#
|
|
106
|
+
# The register export's Yes or No to whether the entry is an ENCePP partner. The export cannot tell an unanswered question from No, so a false is register export: No. Null on a catalogue name entry, where the export writes a default No that is not an answer.
|
|
107
107
|
attr_accessor :is_encepp_partner
|
|
108
108
|
|
|
109
109
|
# When the registrant last edited this catalogue entry. A different clock from last_refreshed_on: it dates the web form, not the database.
|
|
@@ -55,7 +55,7 @@ module PharmaObservatory
|
|
|
55
55
|
# The address of this entry on the HMA-EMA catalogue site (the register's URL LINK).
|
|
56
56
|
attr_accessor :catalogue_url
|
|
57
57
|
|
|
58
|
-
#
|
|
58
|
+
# The register export's Yes or No to whether the entry is an ENCePP partner. The export cannot tell an unanswered question from No, so a false is register export: No. Null on a catalogue name entry, where the export writes a default No that is not an answer.
|
|
59
59
|
attr_accessor :is_encepp_partner
|
|
60
60
|
|
|
61
61
|
# How many member institutions the network's own list names; zero says the network named nobody, not that it has no members.
|
data/lib/pharmaobservatory.rb
CHANGED
|
@@ -144,6 +144,10 @@ require 'pharmaobservatory/models/condition_recruitment_by_phase_response'
|
|
|
144
144
|
require 'pharmaobservatory/models/condition_recruitment_by_phase_row'
|
|
145
145
|
require 'pharmaobservatory/models/condition_recruitment_duration_response'
|
|
146
146
|
require 'pharmaobservatory/models/condition_recruitment_duration_row'
|
|
147
|
+
require 'pharmaobservatory/models/condition_site_coverage_response'
|
|
148
|
+
require 'pharmaobservatory/models/condition_site_coverage_row'
|
|
149
|
+
require 'pharmaobservatory/models/condition_site_years_response'
|
|
150
|
+
require 'pharmaobservatory/models/condition_site_years_row'
|
|
147
151
|
require 'pharmaobservatory/models/condition_sites_response'
|
|
148
152
|
require 'pharmaobservatory/models/condition_sites_row'
|
|
149
153
|
require 'pharmaobservatory/models/condition_trial_start_forecast_response'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pharmaobservatory
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.24
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scientist.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -218,6 +218,10 @@ files:
|
|
|
218
218
|
- docs/ConditionRecruitmentByPhaseRow.md
|
|
219
219
|
- docs/ConditionRecruitmentDurationResponse.md
|
|
220
220
|
- docs/ConditionRecruitmentDurationRow.md
|
|
221
|
+
- docs/ConditionSiteCoverageResponse.md
|
|
222
|
+
- docs/ConditionSiteCoverageRow.md
|
|
223
|
+
- docs/ConditionSiteYearsResponse.md
|
|
224
|
+
- docs/ConditionSiteYearsRow.md
|
|
221
225
|
- docs/ConditionSitesResponse.md
|
|
222
226
|
- docs/ConditionSitesRow.md
|
|
223
227
|
- docs/ConditionTrialStartForecastResponse.md
|
|
@@ -774,6 +778,10 @@ files:
|
|
|
774
778
|
- lib/pharmaobservatory/models/condition_recruitment_by_phase_row.rb
|
|
775
779
|
- lib/pharmaobservatory/models/condition_recruitment_duration_response.rb
|
|
776
780
|
- lib/pharmaobservatory/models/condition_recruitment_duration_row.rb
|
|
781
|
+
- lib/pharmaobservatory/models/condition_site_coverage_response.rb
|
|
782
|
+
- lib/pharmaobservatory/models/condition_site_coverage_row.rb
|
|
783
|
+
- lib/pharmaobservatory/models/condition_site_years_response.rb
|
|
784
|
+
- lib/pharmaobservatory/models/condition_site_years_row.rb
|
|
777
785
|
- lib/pharmaobservatory/models/condition_sites_response.rb
|
|
778
786
|
- lib/pharmaobservatory/models/condition_sites_row.rb
|
|
779
787
|
- lib/pharmaobservatory/models/condition_trial_start_forecast_response.rb
|