pharmaobservatory 0.1.24 → 0.1.26
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 +45 -4
- data/docs/BiomarkerLiteratureAllResponse.md +58 -0
- data/docs/BiomarkerLiteratureAllRow.md +36 -0
- data/docs/BiomarkerLiteratureOrgsResponse.md +58 -0
- data/docs/BiomarkerLiteratureOrgsRow.md +34 -0
- data/docs/BiomarkerLiteraturePeopleResponse.md +58 -0
- data/docs/BiomarkerLiteraturePeopleRow.md +36 -0
- data/docs/BiomarkersApi.md +240 -0
- data/docs/CompanyCompetitorsRow.md +1 -1
- data/docs/CompanyRareDiseaseDeclarationsRow.md +1 -1
- data/docs/ConditionLiteratureOrgsResponse.md +58 -0
- data/docs/ConditionLiteratureOrgsRow.md +34 -0
- data/docs/ConditionLiteraturePeopleResponse.md +58 -0
- data/docs/ConditionLiteraturePeopleRow.md +36 -0
- data/docs/ConditionLiteratureResponse.md +58 -0
- data/docs/ConditionLiteratureRow.md +36 -0
- data/docs/ConditionsApi.md +320 -0
- data/docs/ConditionsRecord.md +2 -0
- data/docs/InvestigatorsApi.md +320 -0
- data/docs/InvestmentGraphNodesRow.md +4 -2
- data/docs/LegalEntitiesApi.md +160 -0
- data/docs/OrgLiteraturePeopleResponse.md +58 -0
- data/docs/OrgLiteraturePeopleRow.md +36 -0
- data/docs/OrgLiteratureResponse.md +58 -0
- data/docs/OrgLiteratureRow.md +40 -0
- data/docs/PatientOrganisationResponse.md +58 -0
- data/docs/PatientOrganisationRow.md +74 -0
- data/docs/RareDiseaseOrganizationsRow.md +1 -1
- data/docs/RareDiseaseTrialSitesRow.md +5 -3
- data/docs/RareDiseasesApi.md +80 -0
- data/docs/RareDiseasesRecord.md +2 -0
- data/docs/TargetLiteratureOrgsResponse.md +58 -0
- data/docs/TargetLiteratureOrgsRow.md +34 -0
- data/docs/TargetLiteraturePeopleResponse.md +58 -0
- data/docs/TargetLiteraturePeopleRow.md +36 -0
- data/docs/TargetLiteratureResponse.md +58 -0
- data/docs/TargetLiteratureRow.md +36 -0
- data/docs/TargetsApi.md +240 -0
- data/lib/pharmaobservatory/api/biomarkers_api.rb +252 -0
- data/lib/pharmaobservatory/api/conditions_api.rb +336 -0
- data/lib/pharmaobservatory/api/investigators_api.rb +336 -0
- data/lib/pharmaobservatory/api/legal_entities_api.rb +168 -0
- data/lib/pharmaobservatory/api/rare_diseases_api.rb +84 -0
- data/lib/pharmaobservatory/api/targets_api.rb +252 -0
- data/lib/pharmaobservatory/models/biomarker_literature_all_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_literature_all_row.rb +322 -0
- data/lib/pharmaobservatory/models/biomarker_literature_orgs_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_literature_orgs_row.rb +311 -0
- data/lib/pharmaobservatory/models/biomarker_literature_people_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_literature_people_row.rb +322 -0
- data/lib/pharmaobservatory/models/company_competitors_row.rb +1 -1
- data/lib/pharmaobservatory/models/company_rare_disease_declarations_row.rb +1 -1
- data/lib/pharmaobservatory/models/condition_literature_orgs_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_literature_orgs_row.rb +311 -0
- data/lib/pharmaobservatory/models/condition_literature_people_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_literature_people_row.rb +322 -0
- data/lib/pharmaobservatory/models/condition_literature_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_literature_row.rb +322 -0
- data/lib/pharmaobservatory/models/conditions_record.rb +13 -1
- data/lib/pharmaobservatory/models/investment_graph_nodes_row.rb +19 -6
- data/lib/pharmaobservatory/models/org_literature_people_response.rb +478 -0
- data/lib/pharmaobservatory/models/org_literature_people_row.rb +322 -0
- data/lib/pharmaobservatory/models/org_literature_response.rb +478 -0
- data/lib/pharmaobservatory/models/org_literature_row.rb +344 -0
- data/lib/pharmaobservatory/models/patient_organisation_response.rb +478 -0
- data/lib/pharmaobservatory/models/patient_organisation_row.rb +545 -0
- data/lib/pharmaobservatory/models/rare_disease_organizations_row.rb +1 -1
- data/lib/pharmaobservatory/models/rare_disease_trial_sites_row.rb +15 -4
- data/lib/pharmaobservatory/models/rare_diseases_record.rb +13 -1
- data/lib/pharmaobservatory/models/target_literature_orgs_response.rb +478 -0
- data/lib/pharmaobservatory/models/target_literature_orgs_row.rb +311 -0
- data/lib/pharmaobservatory/models/target_literature_people_response.rb +478 -0
- data/lib/pharmaobservatory/models/target_literature_people_row.rb +322 -0
- data/lib/pharmaobservatory/models/target_literature_response.rb +478 -0
- data/lib/pharmaobservatory/models/target_literature_row.rb +322 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +24 -0
- metadata +50 -2
|
@@ -0,0 +1,344 @@
|
|
|
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 org_literature dataset: one row per organization and PubMed id. A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class OrgLiteratureRow
|
|
19
|
+
# Legal-entity level: the resolved parent organization record the byline names (edgar:..., ror:... or sponsor:...), the entry key for the legal_entities object type.
|
|
20
|
+
attr_accessor :org_id
|
|
21
|
+
|
|
22
|
+
# The PubMed id.
|
|
23
|
+
attr_accessor :pmid
|
|
24
|
+
|
|
25
|
+
# The paper's title.
|
|
26
|
+
attr_accessor :title
|
|
27
|
+
|
|
28
|
+
# The journal's title.
|
|
29
|
+
attr_accessor :journal_title
|
|
30
|
+
|
|
31
|
+
# The publication year (2016 or later: the dataset holds recent MeSH-indexed literature).
|
|
32
|
+
attr_accessor :pub_year
|
|
33
|
+
|
|
34
|
+
# The paper's study-design label, one normalized publication type by study-design priority.
|
|
35
|
+
attr_accessor :evidence_type
|
|
36
|
+
|
|
37
|
+
# True when a registered clinical trial cites the paper; false for literature no registered trial cites.
|
|
38
|
+
attr_accessor :is_trial_linked
|
|
39
|
+
|
|
40
|
+
# company when the organization is company-typed (matched on a legal-form token in the affiliation); institution for every other organization.
|
|
41
|
+
attr_accessor :org_arm
|
|
42
|
+
|
|
43
|
+
# The strongest tier that attributed a byline to the organization: legal_form or both (company arm), high or medium (institution arm).
|
|
44
|
+
attr_accessor :match_tier
|
|
45
|
+
|
|
46
|
+
# The number of distinct author positions on the paper whose affiliation named the organization.
|
|
47
|
+
attr_accessor :n_bylines
|
|
48
|
+
|
|
49
|
+
# Citations where iCite (the National Institutes of Health citation-metrics service) carries them; null is not measured, never zero.
|
|
50
|
+
attr_accessor :citation_count
|
|
51
|
+
|
|
52
|
+
# The iCite Relative Citation Ratio (RCR) where measured; null is not measured.
|
|
53
|
+
attr_accessor :relative_citation_ratio
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'org_id' => :'org_id',
|
|
59
|
+
:'pmid' => :'pmid',
|
|
60
|
+
:'title' => :'title',
|
|
61
|
+
:'journal_title' => :'journal_title',
|
|
62
|
+
:'pub_year' => :'pub_year',
|
|
63
|
+
:'evidence_type' => :'evidence_type',
|
|
64
|
+
:'is_trial_linked' => :'is_trial_linked',
|
|
65
|
+
:'org_arm' => :'org_arm',
|
|
66
|
+
:'match_tier' => :'match_tier',
|
|
67
|
+
:'n_bylines' => :'n_bylines',
|
|
68
|
+
:'citation_count' => :'citation_count',
|
|
69
|
+
:'relative_citation_ratio' => :'relative_citation_ratio'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns attribute mapping this model knows about
|
|
74
|
+
def self.acceptable_attribute_map
|
|
75
|
+
attribute_map
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
acceptable_attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'org_id' => :'String',
|
|
87
|
+
:'pmid' => :'String',
|
|
88
|
+
:'title' => :'String',
|
|
89
|
+
:'journal_title' => :'String',
|
|
90
|
+
:'pub_year' => :'Integer',
|
|
91
|
+
:'evidence_type' => :'String',
|
|
92
|
+
:'is_trial_linked' => :'Boolean',
|
|
93
|
+
:'org_arm' => :'String',
|
|
94
|
+
:'match_tier' => :'String',
|
|
95
|
+
:'n_bylines' => :'Integer',
|
|
96
|
+
:'citation_count' => :'Integer',
|
|
97
|
+
:'relative_citation_ratio' => :'Float'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'org_id',
|
|
105
|
+
:'pmid',
|
|
106
|
+
:'title',
|
|
107
|
+
:'journal_title',
|
|
108
|
+
:'pub_year',
|
|
109
|
+
:'evidence_type',
|
|
110
|
+
:'is_trial_linked',
|
|
111
|
+
:'org_arm',
|
|
112
|
+
:'match_tier',
|
|
113
|
+
:'n_bylines',
|
|
114
|
+
:'citation_count',
|
|
115
|
+
:'relative_citation_ratio'
|
|
116
|
+
])
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Initializes the object
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
def initialize(attributes = {})
|
|
122
|
+
if (!attributes.is_a?(Hash))
|
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::OrgLiteratureRow` initialize method"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
128
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
129
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::OrgLiteratureRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
131
|
+
end
|
|
132
|
+
h[k.to_sym] = v
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'org_id')
|
|
136
|
+
self.org_id = attributes[:'org_id']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'pmid')
|
|
140
|
+
self.pmid = attributes[:'pmid']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'title')
|
|
144
|
+
self.title = attributes[:'title']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'journal_title')
|
|
148
|
+
self.journal_title = attributes[:'journal_title']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'pub_year')
|
|
152
|
+
self.pub_year = attributes[:'pub_year']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'evidence_type')
|
|
156
|
+
self.evidence_type = attributes[:'evidence_type']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'is_trial_linked')
|
|
160
|
+
self.is_trial_linked = attributes[:'is_trial_linked']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'org_arm')
|
|
164
|
+
self.org_arm = attributes[:'org_arm']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'match_tier')
|
|
168
|
+
self.match_tier = attributes[:'match_tier']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'n_bylines')
|
|
172
|
+
self.n_bylines = attributes[:'n_bylines']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'citation_count')
|
|
176
|
+
self.citation_count = attributes[:'citation_count']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'relative_citation_ratio')
|
|
180
|
+
self.relative_citation_ratio = attributes[:'relative_citation_ratio']
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
185
|
+
# @return Array for valid properties with the reasons
|
|
186
|
+
def list_invalid_properties
|
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
188
|
+
invalid_properties = Array.new
|
|
189
|
+
invalid_properties
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Check to see if the all the properties in the model are valid
|
|
193
|
+
# @return true if the model is valid
|
|
194
|
+
def valid?
|
|
195
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
196
|
+
true
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Checks equality by comparing each attribute.
|
|
200
|
+
# @param [Object] Object to be compared
|
|
201
|
+
def ==(o)
|
|
202
|
+
return true if self.equal?(o)
|
|
203
|
+
self.class == o.class &&
|
|
204
|
+
org_id == o.org_id &&
|
|
205
|
+
pmid == o.pmid &&
|
|
206
|
+
title == o.title &&
|
|
207
|
+
journal_title == o.journal_title &&
|
|
208
|
+
pub_year == o.pub_year &&
|
|
209
|
+
evidence_type == o.evidence_type &&
|
|
210
|
+
is_trial_linked == o.is_trial_linked &&
|
|
211
|
+
org_arm == o.org_arm &&
|
|
212
|
+
match_tier == o.match_tier &&
|
|
213
|
+
n_bylines == o.n_bylines &&
|
|
214
|
+
citation_count == o.citation_count &&
|
|
215
|
+
relative_citation_ratio == o.relative_citation_ratio
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see the `==` method
|
|
219
|
+
# @param [Object] Object to be compared
|
|
220
|
+
def eql?(o)
|
|
221
|
+
self == o
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Integer] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[org_id, pmid, title, journal_title, pub_year, evidence_type, is_trial_linked, org_arm, match_tier, n_bylines, citation_count, relative_citation_ratio].hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def self.build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
transformed_hash = {}
|
|
237
|
+
openapi_types.each_pair do |key, type|
|
|
238
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = nil
|
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
241
|
+
# check to ensure the input is an array given that the attribute
|
|
242
|
+
# is documented as an array but the input is not
|
|
243
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
244
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
245
|
+
end
|
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
new(transformed_hash)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Deserializes the data based on type
|
|
254
|
+
# @param string type Data type
|
|
255
|
+
# @param string value Value to be deserialized
|
|
256
|
+
# @return [Object] Deserialized data
|
|
257
|
+
def self._deserialize(type, value)
|
|
258
|
+
case type.to_sym
|
|
259
|
+
when :Time
|
|
260
|
+
Time.parse(value)
|
|
261
|
+
when :Date
|
|
262
|
+
Date.parse(value)
|
|
263
|
+
when :String
|
|
264
|
+
value.to_s
|
|
265
|
+
when :Integer
|
|
266
|
+
value.to_i
|
|
267
|
+
when :Float
|
|
268
|
+
value.to_f
|
|
269
|
+
when :Boolean
|
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
271
|
+
true
|
|
272
|
+
else
|
|
273
|
+
false
|
|
274
|
+
end
|
|
275
|
+
when :Object
|
|
276
|
+
# generic object (usually a Hash), return directly
|
|
277
|
+
value
|
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
|
284
|
+
{}.tap do |hash|
|
|
285
|
+
value.each do |k, v|
|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
else # model
|
|
290
|
+
# models (e.g. Pet) or oneOf
|
|
291
|
+
klass = PharmaObservatory.const_get(type)
|
|
292
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Returns the string representation of the object
|
|
297
|
+
# @return [String] String presentation of the object
|
|
298
|
+
def to_s
|
|
299
|
+
to_hash.to_s
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_body
|
|
305
|
+
to_hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Returns the object in the form of hash
|
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
|
310
|
+
def to_hash
|
|
311
|
+
hash = {}
|
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
313
|
+
value = self.send(attr)
|
|
314
|
+
if value.nil?
|
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
hash[param] = _to_hash(value)
|
|
320
|
+
end
|
|
321
|
+
hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Outputs non-array value in the form of hash
|
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
326
|
+
# @param [Object] value Any valid value
|
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
|
328
|
+
def _to_hash(value)
|
|
329
|
+
if value.is_a?(Array)
|
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
|
331
|
+
elsif value.is_a?(Hash)
|
|
332
|
+
{}.tap do |hash|
|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
334
|
+
end
|
|
335
|
+
elsif value.respond_to? :to_hash
|
|
336
|
+
value.to_hash
|
|
337
|
+
else
|
|
338
|
+
value
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|